/* Team registration, team card and the organisers' control room. Tokens come from style.css. */

/* ---------- team: HUD chip, registration, team card ---------- */
.team-chip { display: flex; align-items: center; gap: 8px; border: 2px solid var(--navy); background: #fff; padding: 3px 10px 3px 3px; font-family: var(--px); font-size: 12px; letter-spacing: .06em; max-width: 220px; }
.team-chip[hidden] { display: none; }
.team-chip img { width: 28px; height: 28px; object-fit: contain; }
.team-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-chip:hover { background: var(--yellow); }
.start-note { margin-top: 14px; font-size: 14px; opacity: .8; }
.reg-card { text-align: left; width: min(820px, 100%); }
.reg-card h3 { margin-bottom: 20px; }
.reg-tabs { display: flex; margin: 0 48px 22px 0; border: 3px solid var(--navy); width: fit-content; }
.reg-tabs[hidden] { display: none; }
.reg-tabs button { font-family: var(--px); font-size: 12px; letter-spacing: .08em; padding: 9px 14px; }
.reg-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.reg-step[hidden] { display: none; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field span, .avatar-pick legend, .player legend { font-family: var(--px); font-size: 12px; letter-spacing: .1em; }
.field input, .player input, .a-search { font: inherit; font-size: 17px; padding: 12px 14px; border: 3px solid var(--navy); background: #fff; color: var(--navy); width: 100%; outline: none; }
.field input:focus, .player input:focus, .a-search:focus { box-shadow: 4px 4px 0 var(--yellow); }
.avatar-pick { border: 0; margin-bottom: 18px; }
.avatar-pick legend { margin-bottom: 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.avatar { aspect-ratio: 1; border: 3px solid transparent; background: #eef3fb; padding: 6px; transition: transform .1s; }
.avatar img { width: 100%; height: 100%; object-fit: contain; }
.avatar:hover { transform: translateY(-3px); }
.avatar[aria-pressed="true"] { border-color: var(--navy); background: var(--yellow); box-shadow: 4px 4px 0 var(--navy); }
.players { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
.player { border: 3px solid var(--navy); padding: 12px; display: grid; gap: 8px; background: #fff; min-width: 0; }
.player legend { background: var(--navy); color: var(--yellow); padding: 2px 8px; }
.player input { font-size: 15px; padding: 9px 10px; border-width: 2px; }
.form-err { min-height: 24px; color: var(--red); font-weight: 700; margin: 6px 0 10px; }
.reg-done, .team-card { text-align: center; }
.done-avatar { width: 130px; margin: 0 auto 6px; animation: hop .8s ease-in-out infinite; }
.code-big { font-family: var(--px); font-weight: 700; font-size: clamp(38px, 8vw, 60px); letter-spacing: .18em; background: var(--navy); color: var(--yellow); padding: 10px 18px; margin: 12px auto 22px; width: fit-content; user-select: all; }
.code-input { font-family: var(--px) !important; letter-spacing: .3em; text-transform: uppercase; font-size: 26px !important; }
.team-card h3 { margin-bottom: 6px; }

/* ---------- control room ---------- */
.admin { position: fixed; inset: 0; z-index: 90; overflow: auto; background: #0e1830; color: #e8efff; }
.admin-inner { max-width: 1280px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 36px) 80px; }
.admin h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 60px); line-height: 1; margin-top: 6px; }
.admin .kicker { color: #8fa3cc; }
.admin .kicker.y { color: var(--yellow); }
.admin-login { position: relative; max-width: 440px; margin: 12vh auto 0; background: var(--navy); border: 3px solid var(--yellow); padding: 34px; }
.admin-login .quest-x { background: transparent; color: #fff; border-color: #fff; }
.admin-login h2 { margin-bottom: 22px; }
.admin-login .field span { color: #8fa3cc; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 24px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.live-dot { font-family: var(--px); font-size: 11px; letter-spacing: .08em; color: var(--green); margin-right: 6px; }
.a-btn { font-family: var(--px); font-size: 12px; letter-spacing: .08em; padding: 8px 12px; border: 2px solid #4a5a80; color: #e8efff; background: transparent; }
.a-btn:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); }
.a-btn:disabled { opacity: .3; cursor: default; }
.a-btn.sm { font-size: 10px; padding: 6px 8px; }
.a-btn.danger:hover { border-color: var(--red); color: var(--red); }
.a-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.a-tile { background: var(--navy); border: 2px solid #26365e; padding: 18px 20px; display: grid; }
.a-tile b { font-family: var(--px); font-size: 44px; line-height: 1.1; color: var(--yellow); }
.a-tile span { font-family: var(--px); font-size: 12px; letter-spacing: .12em; }
.a-tile small { color: #8fa3cc; font-size: 13px; }
.a-panel { background: var(--navy); border: 2px solid #26365e; padding: 20px; margin-bottom: 14px; }
.a-controls { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.seg { display: flex; flex-wrap: wrap; margin: 10px 0; border: 2px solid #4a5a80; width: fit-content; }
.seg button { font-family: var(--px); font-size: 12px; letter-spacing: .06em; padding: 10px 14px; color: #e8efff; }
.seg button + button { border-left: 2px solid #4a5a80; }
.seg button[aria-pressed="true"] { background: var(--yellow); color: var(--navy); }
.a-note { color: #8fa3cc; font-size: 13px; }
.a-note .link-btn { color: #8fa3cc; opacity: 1; margin: 0; }
.toggle { margin: 10px 0; font-family: var(--px); font-size: 14px; letter-spacing: .1em; padding: 10px 18px; border: 2px solid var(--red); color: var(--red); }
.toggle.on { border-color: var(--green); color: var(--navy); background: var(--green); }
.funnel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 14px; }
.f-col { display: grid; justify-items: center; gap: 4px; text-align: center; }
.f-bar { width: 100%; max-width: 90px; height: 120px; background: #16234a; display: flex; align-items: end; }
.f-bar span { width: 100%; background: linear-gradient(var(--green), var(--green-d)); transition: height .4s; min-height: 2px; }
.f-col b { font-family: var(--px); font-size: 26px; color: #fff; }
.f-col small { font-size: 13px; color: #c9d6f2; }
.dim { color: #8fa3cc !important; }
.a-table-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.a-search { max-width: 360px; background: #0e1830; color: #fff; border-color: #4a5a80; font-size: 15px; padding: 9px 12px; }
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.a-table th { text-align: left; font-family: var(--px); font-size: 10px; letter-spacing: .1em; color: #8fa3cc; font-weight: 400; padding: 8px 10px; border-bottom: 2px solid #26365e; }
.a-table td { padding: 12px 10px; border-bottom: 1px solid #1e2c52; vertical-align: middle; }
.a-table .rank { font-family: var(--px); font-size: 18px; color: var(--yellow); }
.a-team { display: flex; gap: 10px; align-items: center; }
.a-team img { width: 44px; height: 44px; object-fit: contain; background: #16234a; padding: 3px; }
.a-team b { display: block; font-size: 15px; }
.a-team code { font-family: var(--px); font-size: 11px; letter-spacing: .12em; color: var(--yellow); background: none; padding: 0; margin-right: 8px; }
.a-team small, .a-table td small { color: #8fa3cc; font-size: 12px; }
.a-players div { line-height: 1.4; }
.a-players a { color: #8fa3cc; font-size: 12px; margin-left: 4px; }
.pips { display: flex; gap: 4px; margin-bottom: 4px; }
.pip { width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--px); font-size: 11px; border: 2px solid #4a5a80; color: #4a5a80; }
.pip.ok { background: var(--green); border-color: var(--green); color: var(--navy); }
.pip.org { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.pip.bk { background: #8fd3ff; border-color: #8fd3ff; color: var(--navy); }
.a-btn.on { background: #8fd3ff; color: var(--navy); border-color: #8fd3ff; }
.fresh { color: var(--green); }
.a-actions { white-space: nowrap; }
.a-actions .a-btn + .a-btn { margin-left: 4px; }
.a-empty { color: #8fa3cc; padding: 30px 0; text-align: center; }
.admin-flash { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); visibility: hidden; background: var(--green); color: var(--navy); font-family: var(--px); font-size: 13px; letter-spacing: .06em; padding: 12px 18px; transition: transform .2s steps(3); z-index: 95; }
.admin-flash.show { transform: translate(-50%, 0); visibility: visible; }
.admin-flash.bad { background: var(--red); color: #fff; }

/* event mode + competition panels */
.a-mode { border-color: var(--yellow); }
.a-mode-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.a-mode-head b { color: #fff; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.mode { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 2px solid #4a5a80; color: #e8efff; }
.mode b { font-family: var(--px); font-size: 16px; letter-spacing: .08em; }
.mode small { font-size: 13px; color: #8fa3cc; }
.mode:hover { border-color: var(--yellow); }
.mode.on { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.mode.on small { color: var(--navy); }
.modes.games { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mode:disabled { opacity: .45; cursor: not-allowed; }
.a-games .a-note a { color: var(--yellow); }
.a-warn { color: var(--yellow); }
.a-mode-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13px; color: #c9d6f2; }
.a-mode-tools input { width: 72px; font: inherit; padding: 5px 7px; background: #0e1830; color: #fff; border: 2px solid #4a5a80; margin-left: 4px; }
.a-mode-tools .sep { width: 2px; height: 22px; background: #26365e; }
.a-stats.mini { margin: 6px 0 14px; }
.a-stats.mini .a-tile { padding: 12px 16px; }
.a-stats.mini .a-tile b { font-size: 30px; }
.a-flag { background: rgba(223, 41, 53, .15); border: 2px solid var(--red); padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.a-comp .rank small.adv { display: block; font-size: 10px; color: var(--green); }
.a-comp tr.pulled td { opacity: .45; }
.a-comp tr.pulled td:last-child { opacity: 1; }
.a-comp .files a { display: inline-block; font-family: var(--px); font-size: 10px; color: var(--yellow); margin-right: 8px; }
.a-comp .warn { color: var(--red); font-weight: 700; }

/* danger zone */
.a-danger { border-color: var(--red); }
.a-danger .kicker { color: var(--red); }
.wipes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.wipe { display: grid; gap: 10px; padding: 16px; border: 2px dashed rgba(223, 41, 53, .6); }
.wipe b { font-family: var(--px); font-size: 14px; letter-spacing: .08em; }
.wipe p { font-size: 14px; color: #c9d6f2; }
.wipe label { display: grid; gap: 5px; font-size: 13px; color: #8fa3cc; }
.wipe code { color: var(--red); font-family: var(--px); font-size: 12px; letter-spacing: .08em; background: none; }
.wipe input { font: inherit; padding: 8px 10px; background: #0e1830; color: #fff; border: 2px solid #4a5a80; }
.wipe input.match { border-color: var(--red); }
.wipe .a-btn.danger:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }

@media (max-width: 900px) {
  .wipes { grid-template-columns: 1fr; }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .team-chip span { display: none; }
  .team-chip { padding-right: 3px; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .players { grid-template-columns: 1fr; }
  .reg-tabs { margin-right: 44px; }
  .reg-tabs button { padding: 8px 9px; font-size: 10px; }
  .a-stats { grid-template-columns: repeat(2, 1fr); }
  .a-controls { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(3, 1fr); }
}

/* polaroids in the control room */
.a-polaroids { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.a-prog { height: 10px; width: min(360px, 70vw); background: #1c2848; border: 2px solid #4a5a80; margin: 6px 0; }
.a-prog span { display: block; height: 100%; background: var(--yellow); }
.a-pcount { font-family: var(--px); color: #8fd3ff; }
.a-pcount.full { color: #7dffa0; }
.a-thumbs { display: flex; gap: 4px; margin: 6px 0; }
.a-thumb { width: 44px; height: 38px; padding: 0; border: 2px solid #4a5a80; background: #1c2848; color: #4a5a80; font-family: var(--px); font-size: 10px; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.a-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-thumb.sent { border-color: #7dffa0; }
.a-thumb.empty { cursor: default; border-style: dashed; }
.a-thumbs.big { gap: 8px; flex-wrap: wrap; }
.a-thumbs.big .a-thumb { width: 84px; height: 72px; font-size: 14px; }
.a-cellbtns { display: flex; gap: 6px; margin-top: 6px; }
.a-players .a-btn { margin-top: 6px; }
.a-modal { position: fixed; inset: 0; z-index: 92; background: rgba(5, 10, 25, .7); display: grid; place-items: center; padding: 16px; }
.a-modal-box { background: #1c2848; border: 2px solid #4a5a80; min-width: min(360px, 92vw); max-width: 92vw; max-height: 85vh; overflow: auto; padding: 14px 16px; color: #e8efff; }
.a-modal-box header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; font-family: var(--px); font-size: 12px; letter-spacing: .08em; }
.a-plist div { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid #33426b; }
.a-plist div:first-child { border-top: 0; }
.a-plist a { color: #8fa3cc; font-size: 13px; }
.a-legend { display: block; margin-top: 10px; color: #8fa3cc; }
.a-lightbox { position: fixed; inset: 0; z-index: 93; background: rgba(5, 10, 25, .88); display: grid; place-items: center; cursor: zoom-out; }
.a-lightbox figure { margin: 0; max-width: 92vw; text-align: center; color: #e8efff; }
.a-lightbox img { max-width: 92vw; max-height: 80vh; box-shadow: 0 10px 40px #000a; }
.a-lightbox figcaption { margin-top: 10px; font-family: var(--px); font-size: 12px; }
.a-lightbox a { color: var(--yellow); }
