/* Press Golf Admin, on the portal's tokens and base rules (portal.css loads first). */
.btn.wide {
  width: 100%;
  margin-top: 8px;
}
.adminline {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 8px;
}
.adminline:empty {
  display: none;
}
.qrwrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}
.qrimg {
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  image-rendering: pixelated;
}
.secret {
  font-family: Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  overflow-wrap: anywhere;
  margin: 4px 0 14px;
}
.codes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.codes > li {
  font-family: Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--green-950);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

/* The header: the brand, the five sections and the Account button. */
.topinner {
  flex-wrap: wrap;
}
.adminnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.adminnav > a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.adminnav > a:hover {
  color: var(--cream);
}
.adminnav > a[aria-current="page"] {
  background: var(--green-700);
  color: var(--gold-bright);
  border-color: var(--gold);
}
.adminnav > a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.adminme {
  margin-left: auto;
}
.adminme > .btn {
  padding: 8px 14px;
  font-size: 13px;
}
body.booting #view,
body.booting .adminnav,
body.booting .adminme,
body.booting #account-panel {
  display: none;
}
.acctpanel {
  margin: 18px 0;
}
.kv {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 6px 14px;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.kv > dt {
  color: var(--muted);
}
.kv > dd {
  color: var(--cream);
  overflow-wrap: anywhere;
}
/* At 400 px and under each label sits over its value, so a value has the card's full width, not what a 120 px
   label column leaves it. */
@media (max-width: 400px) {
  .kv {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }
  .kv > dt:not(:first-child) {
    margin-top: 8px;
  }
}

/* A screen's head: its title, its updated line and its buttons. */
.screenhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 16px;
}
.screenhead > h1 {
  font-size: 26px;
  color: var(--gold-bright);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.screenhead > .btnrow {
  margin-top: 0;
}
.screensub {
  color: var(--muted);
  font-size: 13px;
  margin: -8px 0 16px;
  overflow-wrap: anywhere;
}
/* Cards stacked straight in a screen or a tab keep the grid's gap between them. */
#view > .card + .card,
#view > .card + #golfer-results,
#tab-pane > .card + .card,
#golfer-results > .card + .card,
#tab-pane > .card + .adminline,
#golfer-results > .card + .adminline {
  margin-top: 18px;
}
/* Links outside a table read gold too, and a long address wraps instead of widening the page. */
#view a:not(.btn),
.admindialog a {
  color: var(--gold-bright);
  overflow-wrap: anywhere;
}

/* The dashboard tiles. */
.statgroup {
  margin-bottom: 22px;
}
.statgroup > h2 {
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: -apple-system, sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}
.adminstats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.adminstat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  flex: 1 1 160px;
  min-width: 0;
  text-align: left;
  color: var(--cream);
  font: inherit;
}
button.adminstat {
  cursor: pointer;
}
button.adminstat:hover {
  border-color: var(--gold);
}
button.adminstat:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.adminstat > .n {
  font-family: Georgia, serif;
  font-size: 30px;
  color: var(--gold-bright);
  line-height: 1;
}
.adminstat > .l {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.adminstat > .sm {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.adminstat.failed > .n {
  color: var(--muted);
}
.bucketrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.bucketrow > button {
  background: var(--green-850);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
}
.bucketrow > button:hover {
  border-color: var(--gold);
}

/* Tags and pills. */
.admintag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}
.admintag.live {
  background: rgba(111, 206, 143, 0.14);
  color: var(--good);
  border-color: rgba(111, 206, 143, 0.45);
}
.admintag.up,
.admintag.warn {
  background: rgba(203, 163, 81, 0.14);
  color: var(--gold-bright);
  border-color: rgba(203, 163, 81, 0.45);
}
.admintag.past,
.admintag.off {
  background: var(--green-800);
  color: var(--muted);
  border-color: var(--line);
}
.admintag.bad {
  background: rgba(192, 65, 59, 0.16);
  color: var(--bad);
  border-color: rgba(192, 65, 59, 0.5);
}

/* Filters and search. */
.adminfilter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.adminfilter > .subtabs {
  margin: 0;
}
.subtabs > button[aria-pressed="true"] {
  background: var(--green-700);
  color: var(--gold-bright);
  border-color: var(--gold);
}
/* The search shares a row with the filter pills only where it keeps 340 px, so beside its Search button the field
   always has room for its whole hint. */
.adminsearch {
  display: flex;
  gap: 8px;
  flex: 1 1 340px;
  min-width: 0;
}
.adminsearch > input {
  flex: 1 1 auto;
  min-width: 0;
}
.adminsearch > .btn {
  flex: 0 0 auto;
}
/* At 400 px and under the field takes the whole row and the Search button sits under it, as wide, like the admin's
   other phone buttons. */
@media (max-width: 400px) {
  .adminsearch {
    flex-direction: column;
  }
}

/* Tables scroll sideways inside their card, never the page; relative, so a screen-reader line inside stays clipped. */
.tablewrap {
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.admintable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
/* A list table keeps a working width and scrolls inside its card on a phone, never one word a line. */
.tablewrap > .admintable:not(.holes) {
  min-width: 720px;
}
.admintable th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admintable td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  vertical-align: top;
}
.admintable tr:last-child > td {
  border-bottom: 0;
}
.admintable tr.clickable:hover > td {
  background: var(--green-850);
  cursor: pointer;
}
/* Chrome counts a piece that ends in a hyphen a fraction of a pixel short, so a table link ends with 1 px to spare
   and a long address breaks after its hyphen instead of before it. */
.admintable td > a {
  color: var(--gold-bright);
  text-decoration: none;
  padding-inline-end: 1px;
}
.admintable td > a:hover {
  text-decoration: underline;
}
/* A table link breaks only between words, so whole words set each column's minimum and a narrow table scrolls in
   its card; the id outranks the view's link rule, whose anywhere let a column shrink to one letter. */
#view .admintable td > a {
  overflow-wrap: break-word;
}
/* The Board link, the one table link that opens a new tab, is one short word on one line. */
.admintable td > a[target="_blank"] {
  white-space: nowrap;
}
/* The small line under a cell's value breaks only between words too, so it cannot squeeze its column either. */
.admintable td > .sm {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
  overflow-wrap: break-word;
}
/* A button in a table cell keeps its words on one line; a table wider than its card scrolls inside it instead. */
.admintable td > .btn {
  white-space: nowrap;
}
.listfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.listfoot > .btnrow {
  margin-top: 0;
}

/* Dialogs: the step-up code, CSV and every action sheet sit on one layer over the page. */
.adminlayer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 14, 9, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.adminlayer[hidden] {
  display: none;
}
.admindialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 520px;
}
.admindialog > h2 {
  font-size: 18px;
  color: var(--gold-bright);
  font-weight: 400;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.admindialog > p {
  font-size: 13.5px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.admindialog > .btnrow {
  margin-top: 14px;
}
.sheetlines {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13.5px;
}
.sheetlines > li {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

/* The detail screens: cards in one column, hole tables that scroll sideways, and actions with their lines. */
.detailcard {
  min-width: 0;
}
.detailcard > h3 {
  margin-bottom: 10px;
}
.roundblock {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.roundblock:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.admintable.holes th,
.admintable.holes td {
  padding: 6px 7px;
  text-align: center;
  white-space: nowrap;
}
.admintable.holes th:first-child,
.admintable.holes td:first-child {
  text-align: left;
}
.admintable td.fixed {
  color: var(--gold-bright);
  font-weight: 700;
}
.actionrow {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.actionrow:first-of-type {
  border-top: 0;
}
.actionrow > .adminline {
  margin-top: 4px;
}
.sheetlines > li > .sm,
.activity > li > .sm,
#golfer-pushes > li > .sm {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
