/* The operator desk shares Sand Arena's palette without the public sidebar. */
.operator-page .site-header {
  padding-inline: max(24px, calc((100% - 1072px) / 2));
}
.operator-page .mode-badge {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
}
.operator-page .site-header > .quiet-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
}
.operator-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.operator-shell .page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}
.operator-shell .page-heading > div {
  min-width: 0;
}
.operator-shell .page-heading h1 {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
}
.operator-shell .page-heading h2 {
  margin-top: 7px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.operator-shell .page-heading p {
  max-width: 630px;
  margin: 9px 0;
  color: var(--muted);
  line-height: 1.6;
}
.operator-shell .page-heading a {
  display: inline-block;
  color: var(--gold);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.operator-shell .page-heading > .button {
  flex-shrink: 0;
}
.operator-access {
  padding: 20px 22px;
  margin-bottom: 24px;
}
.operator-access h2,
.operator-shell h3 {
  font-family: var(--font);
  font-size: 19px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.3px;
}
.operator-access p {
  line-height: 1.6;
  margin: 8px 0;
  color: var(--muted);
}
.operator-access .error {
  color: var(--red);
}
.operator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.operator-body {
  padding: 22px;
}
.operator-shell .panel-bar h2,
.operator-shell .panel-bar h3 {
  font-size: 16px;
}
.operator-shell fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.operator-shell label {
  display: block;
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 13px;
}
.operator-shell input,
.operator-shell select,
.operator-shell textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.operator-shell input:focus-visible,
.operator-shell select:focus-visible,
.operator-shell textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.operator-shell textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
.operator-shell .button {
  min-height: 44px;
  font-size: 13px;
}
.operator-shell .field-hint {
  margin: 10px 0 16px;
  font-size: 12px;
  line-height: 1.65;
}
.operator-details {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
  gap: 9px 14px;
  font-size: 13px;
  line-height: 1.6;
}
.operator-details dt {
  color: var(--muted);
}
.operator-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.operator-audit-panel,
.operator-review,
#operator-decision {
  margin-top: 24px;
}
.operator-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.operator-review {
  border-top-color: var(--gold);
}
.operator-review p {
  font-size: 14px;
  line-height: 1.7;
}
.operator-shell details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.operator-shell summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.operator-shell details .operator-details {
  font-size: 12px;
}
.operator-shell #operator-more,
.operator-shell .suggestions-more {
  margin-top: 18px;
}
#suggestions-panel .operator-access label {
  margin-top: 0;
}
#suggestions-panel .operator-access select {
  max-width: 260px;
}
.operator-shell .suggestion-text {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.operator-footnote {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.operator-shell [hidden] {
  display: none !important;
}
.operations-section {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.operations-section .panel {
  margin-bottom: 20px;
}
.operations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.operations-table th,
.operations-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.operations-table thead th {
  color: var(--muted);
  font-size: 11px;
}
.operations-choice.button {
  padding: 8px 10px;
  font-size: 12px;
  white-space: normal;
}
.operations-section .operator-audit-panel details {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .operator-page .site-header {
    flex-wrap: wrap;
    height: auto;
    min-height: 80px;
    padding: 14px 16px;
    gap: 8px 16px;
  }
  .operator-page .mode-badge {
    margin-left: auto;
    font-size: 10px;
  }
  .operator-page .site-header > .quiet-button {
    margin-left: auto;
  }
  .operator-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .operator-shell {
    padding: 24px 16px;
  }
  .operator-shell .page-heading {
    display: block;
  }
  .operator-shell .page-heading .button {
    margin-top: 15px;
  }
  .operator-shell .page-heading h1 {
    font-size: 30px;
  }
  .operator-shell .page-heading h2 {
    font-size: 25px;
  }
  .operator-body {
    padding: 18px;
  }
  .operator-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .operator-details dd {
    margin-bottom: 10px;
  }
}
@media (max-width: 620px) {
  .operator-page .brand-logo {
    width: 128px;
  }
}
@media (max-width: 420px) {
  .operations-table th,
  .operations-table td {
    padding: 8px 3px;
    font-size: 12px;
  }
  .operations-choice.button {
    padding-inline: 6px;
    font-size: 11px;
  }
}
/* Staff player tracker (docs/STAFF-PLAYER-TRACKER.md, section 9): desk tabs, Players
   and Live log in the same slate and sand-gold components as the rest of the desk. */
html:has(body.operator-page) {
  scroll-padding-top: 150px;
}
.operator-tabs {
  position: sticky;
  top: 80px;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  scrollbar-width: thin;
}
.operator-tabs button,
.operator-subtabs button {
  flex: none;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #a4aaa4;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.operator-tabs button:hover,
.operator-subtabs button:hover {
  background: #222929;
  color: #e6e5d9;
}
.operator-tabs button[aria-selected="true"],
.operator-subtabs button[aria-selected="true"] {
  border-color: #74684a;
  background: #e6bb720c;
  color: #e6cf9f;
}
.operator-tabs button:focus-visible,
.operator-subtabs button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}
.operator-tabs-status {
  margin: 0 0 16px;
}
.operator-tabs-status:empty {
  margin: 0;
}
.operator-tabpanel:focus,
#players-heading:focus,
#live-heading:focus,
#players-name:focus,
.players-subview:focus {
  outline: none;
}
.operator-tabpanel > .operations-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.operator-notice {
  margin: 0 0 12px;
}
.operator-status:empty,
.players-search-note:empty {
  margin: 0;
}
.operator-health {
  margin: 0 0 12px;
  color: #d0bf88;
}
/* The suggestion list opens over the panels below, so this panel does not clip it. */
.players-search-panel {
  position: relative;
  z-index: 5;
  margin-bottom: 20px;
  overflow: visible;
}
.operator-shell .players-search-panel label {
  margin-top: 0;
}
.players-combobox {
  position: relative;
}
.players-suggestions {
  position: absolute;
  z-index: 15;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--raised);
  box-shadow: 0 12px 26px #0009;
  list-style: none;
}
.players-suggestions li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.players-suggestions li:hover,
.players-suggestions li[aria-selected="true"] {
  background: #2f3533;
  color: #f5e0b6;
  outline: 1px solid #74684a;
}
.players-suggestions small,
.players-recent small,
.operator-muted {
  color: var(--muted);
  font-size: 11px;
}
.players-lists {
  margin-top: 4px;
}
.players-recent {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.players-recent li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 13px;
}
.operator-shell a.operator-player,
.operator-link-button {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.operator-link-button {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.operator-shell a.operator-player:hover,
.operator-link-button:hover {
  color: #f7dfb6;
}
.operator-shell .players-back {
  min-height: 44px;
  margin-bottom: 12px;
  font-size: 13px;
}
#players-card {
  margin-bottom: 18px;
}
.operator-shell #players-name {
  font-size: 24px;
}
#players-subtitle {
  margin-top: 4px;
}
.players-balances {
  margin-top: 20px;
}
.players-balances h4,
.operator-records h4,
.players-subview h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}
.players-holds {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.operator-subtabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.players-subview {
  min-width: 0;
}
.operator-records {
  margin-bottom: 20px;
}
.operator-records > .operator-body {
  padding-top: 18px;
}
.operator-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.operator-shell .operator-filters label {
  margin: 0 0 6px;
}
.operator-field {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
}
.operator-date-row {
  display: flex;
  gap: 8px;
}
.operator-date-row input {
  min-width: 0;
}
.operator-date-row .button {
  flex: none;
}
.operator-chips {
  flex-wrap: wrap;
}
.operator-shell .operator-chips button {
  min-height: 36px;
  font-size: 11px;
}
.operator-note {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.operator-empty {
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}
.operator-records-table th,
.operator-records-table td {
  padding: 10px 12px;
  vertical-align: top;
}
.operator-records-table td {
  overflow-wrap: anywhere;
}
.operator-records-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.operator-records-table .operator-number {
  text-align: right;
  white-space: nowrap;
}
.operator-row-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.operator-row-toggle[aria-expanded="true"] {
  border-color: #74684a;
  color: #e6cf9f;
}
.operator-row-details > td {
  background: #161b1c;
}
.operator-copy {
  min-height: 28px;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.operator-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.operator-amount img {
  width: 16px;
  height: 16px;
}
.operator-amounts {
  display: grid;
  gap: 3px;
}
.operator-positive {
  color: var(--green);
}
.operator-negative {
  color: var(--red);
}
.operator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.operator-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.operator-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
}
.operator-card h4 img {
  width: 18px;
  height: 18px;
}
.operator-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  margin: 0;
  font-size: 12px;
}
.operator-card dt {
  color: var(--muted);
}
.operator-card dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.operator-chart {
  margin: 0 0 8px;
}
.operator-chart-plot {
  position: relative;
}
.operator-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 180;
  border-bottom: 1px solid var(--line);
}
.operator-chart-y {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  padding: 0 4px;
  border-radius: 3px;
  background: #1b2021d9;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.operator-chart-x {
  position: relative;
  height: 20px;
  margin-top: 4px;
}
.operator-chart-x span {
  position: absolute;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.operator-chart figcaption {
  margin: 6px 0 0;
}
.operator-mix {
  margin-top: 12px;
}
.operator-mix-bar {
  display: block;
  width: 100%;
  height: 10px;
}
.operator-mix-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.live-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  flex-shrink: 0;
}
.operator-shell label.live-auto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  font-size: 13px;
}
.operator-shell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--gold);
}
#live-sources {
  margin-bottom: 12px;
}
#live-panel .operator-records .operator-empty {
  margin-inline: 22px;
}
@media (max-width: 900px) {
  .operator-tabs {
    top: 69px;
  }
}
@media (max-width: 760px) {
  /* The header wraps to an automatic height here, so it scrolls away and the tab bar sticks at the top. */
  .operator-page .site-header {
    position: static;
  }
  .operator-tabs {
    top: 0;
  }
}
@media (max-width: 620px) {
  /* Phones read each record as a card, labelled cell by cell, instead of scrolling sideways. */
  .operator-records-table,
  .operator-records-table tbody,
  .operator-records-table tr {
    display: block;
  }
  .operator-records-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .operator-records-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid #303a2e;
  }
  .operator-records-table td {
    display: grid;
    grid-template-columns: minmax(84px, 36%) minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    border: 0;
  }
  .operator-records-table td::before {
    content: attr(data-label);
    color: #849084;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }
  /* Tags, buttons and amounts keep their own width inside a card cell. */
  .operator-records-table td > * {
    justify-self: start;
  }
  .operator-records-table .operator-number {
    text-align: left;
    white-space: normal;
  }
  .operator-records-table tr.operator-row-details > td {
    display: block;
    padding: 8px;
  }
  .operator-records-table tr.operator-row-details > td::before {
    content: none;
  }
  .operator-field {
    max-width: none;
  }
}
@media (max-width: 420px) {
  .operator-tabs button,
  .operator-subtabs button {
    padding: 10px 12px;
  }
  .operator-field {
    flex-basis: 100%;
  }
  .operator-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Staff sign-in and setup pages on the staff host (docs/STAFF-REMOTE-ACCESS.md, section 8). */
.operator-auth {
  max-width: 600px;
}
.operator-auth .panel + .panel {
  margin-top: 18px;
}
.operator-auth .panel + .field-hint {
  margin-top: 18px;
}
.staff-qr {
  width: min(240px, 100%);
  margin: 8px 0 4px;
  border-radius: 5px;
  background: #ffffff;
}
.staff-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.staff-secret,
.staff-codes {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}
.staff-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 18px;
  padding-left: 22px;
}
.operator-shell .staff-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.operator-shell .staff-check input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
}
.operator-auth #setup-to-login {
  margin-top: 16px;
}
.operator-auth #setup-finish {
  margin-top: 12px;
}
@media (max-width: 420px) {
  .staff-codes {
    grid-template-columns: minmax(0, 1fr);
  }
}
