/* Administrator-only palette. The class is set before the legacy app starts. */
:root.admin-light {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #f0f3f7;
  --line: #d7dee8;
  --text: #172231;
  --muted: #5b6a7b;
  --lime: #8c5b08;
  --mint: #15724d;
  --red: #b92f43;
  --amber: #8c5b08;
  --white: #172231;
  --admin-accent: #f7c24f;
  --admin-accent-soft: #fff4d8;
  --admin-success-soft: #eaf5ee;
  --admin-danger-soft: #fff0f2;
  background: var(--bg);
  color: var(--text);
}

.admin-light body,
.admin-light :is(.admin-mode.active, .admin-game-mode, .game-detail-workspace) {
  background: var(--bg);
  color: var(--text);
}

.admin-light #adminMode .admin-sidebar,
.admin-light :is(.admin-topbar, .game-detail-topbar) {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.admin-light .admin-sidebar nav button,
.admin-light .admin-nav-group > summary,
.admin-light .admin-nav-group > summary b,
.admin-light .admin-user button {
  color: #344255;
}

.admin-light .admin-sidebar nav button:hover,
.admin-light .admin-nav-group[open],
.admin-light .admin-user-menu-trigger:hover,
.admin-light .admin-user-menu-trigger[aria-expanded="true"] {
  background: #f2f5f8;
  border-color: var(--line);
}

.admin-light .admin-nav-group > summary:hover,
.admin-light .admin-nav-group[open] > summary {
  background: var(--admin-accent-soft);
  color: var(--lime);
}

.admin-light #adminMode .admin-sidebar nav button.active {
  background: var(--admin-accent-soft);
  color: #754b08;
  box-shadow: inset 3px 0 #d79c2d;
}

.admin-light .admin-user > span {
  background: var(--admin-success-soft);
  color: var(--mint);
}

.admin-light :is(.admin-card, .metric-card, .hr-panel, .hr-metric, .hr-table-card,
  .hr-period, .hr-table-shortcut, .admin-user-menu, .modal-card,
  .game-detail-metrics > div, .saved-structure-card, .timer-game-item) {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 3px 14px #20324b05;
}

.admin-light :is(.admin-store-scope, .admin-fixed-store) {
  background: #f7f9fc;
  border-color: var(--line);
}

.admin-light .admin-fixed-store {
  color: #344255 !important;
}

.admin-light :is(.admin-store-scope span, .field label, .ticket-action-group legend,
  .ticket-action-group span, .structure-bulk-time > label, .account-rule-card ul,
  .admin-hierarchy span, .hr-field, .confirm-summary b, .settlement-kind-card dd,
  .settlement-kind-card > div:first-child strong) {
  color: #344255;
}

.admin-light :is(.hr-metric span, .hr-metric strong small, .hr-seat small,
  .hr-seat em, .admin-ranking-position, .round-drag-handle small, .medal-rule p,
  .ranking-month-toolbar > small, .settlement-filter > small) {
  color: var(--muted);
}

.admin-light :is(input, select, textarea),
.admin-light #adminMode :is(input, select, textarea) {
  background-color: #ffffff;
  color: var(--text);
  border-color: #cbd5e1;
  color-scheme: light;
  accent-color: #a7761b;
}

.admin-light :is(input, textarea)::placeholder {
  color: #69788b;
  opacity: 1;
}

.admin-light :is(input, select, textarea):focus-visible {
  outline: 2px solid #a7761b;
  outline-offset: 2px;
}

.admin-light :is(button, a):focus-visible {
  outline: 2px solid #a7761b;
  outline-offset: 3px;
}

.admin-light :is(.table-action, .ghost, .hr-button, .cancel, .admin-chat button,
  .admin-chat-toggle, .mobile-ticket-tabs button, .mobile-ticket-secondary button,
  .step-buttons button, .game-detail-top-actions button),
.admin-light #adminMode :is(.admin-drawer-toggle, .admin-drawer-close,
  .mobile-ticket-tabs button, .mobile-ticket-secondary button, .admin-table .table-action) {
  background: #f4f6f9;
  color: #344255;
  border-color: #cfd8e3;
}

.admin-light :is(.table-action, .ghost, .hr-button, .cancel):hover {
  background: #eaf0f6;
}

.admin-light :is(.primary, .inline-action, .confirm, .hr-button.primary,
  .member-search-control button, .search-row button, .admin-chat-compose [data-chat-send]) {
  background: var(--admin-accent);
  color: #38290e;
  border-color: #dfac3c;
}

.admin-light :is(.primary, .inline-action, .confirm, .hr-button.primary):hover {
  background: #edb638;
}

.admin-light :is(.danger, .danger-mini, .hr-button.danger, .admin-user-menu button:hover) {
  background: var(--admin-danger-soft);
  color: var(--red);
  border-color: #e5b4bd;
}

.admin-light :is(.application-row, .ticket-action-group label, .structure-bulk-time,
  .ticket-payment, .confirm-summary, .automation-flow > div, .game-history-search,
  .ticket-history-search, .ranking-month-toolbar, .settlement-filter, .empty-note, .admin-hierarchy > article,
  .settlement-kind-card, .settlement-kind-card dl div, .finished-list span,
  .hr-data th, .hr-badge, .role-pill, .op-notification.unread) {
  background: #f7f9fc;
  color: var(--text);
  border-color: var(--line);
}

.admin-light .money-in-summary {
  background: var(--admin-accent-soft);
  color: #62470b;
  border-color: #e3cd98;
}

.admin-light .money-in-summary :is(p, small) {
  color: #6d5c35;
}

.admin-light .money-in-awards strong {
  color: #8c5b08;
}

.admin-light .step-buttons button:last-child {
  background: var(--admin-success-soft);
  color: var(--mint);
  border-color: #bfd9c9;
}

.admin-light :is(.ticket-action-group label.active, .break-round, .operational-note,
  .medal-rule, .admin-hierarchy > article > b, .hr-badge.gold, .role-pill.owner,
  .hr-seat.selected, .hr-seat.drop, .hr-seat-selected, .running-count,
  .timer-game-item.active) {
  background: var(--admin-accent-soft);
  color: #754b08;
  border-color: #e3cd98;
}

.admin-light .timer-game-meta b {
  color: var(--text);
}

.admin-light .live-summary > div {
  background: #f7f9fc;
  border-color: var(--line);
}

.admin-light .live-summary .average {
  background: var(--admin-accent-soft);
  border-color: #e3cd98;
}

.admin-light .round-drag-handle {
  background: var(--admin-accent-soft) !important;
  border-color: #e3cd98 !important;
}

.admin-light .ticket-admin-note {
  color: #754b08 !important;
}

.admin-light .ticket-history-row > span b {
  color: #344255;
}

.admin-light :is(.ticket-history-row.revoked > span em, .history-cancelled) {
  color: var(--red);
}

.admin-light :is(.ticket-history-row.customer-used > span em, .history-used,
  .ticket-history-legend .used) {
  color: var(--mint);
}

.admin-light .automation-flow b {
  background: var(--admin-accent);
  color: #38290e;
}

.admin-light :is(.status-pill, .hr-badge.live, .role-pill.store_manager) {
  background: var(--admin-success-soft);
  color: var(--mint);
  border-color: #bfd9c9;
}

.admin-light .status-pill.scheduled {
  background: var(--admin-accent-soft);
  color: #754b08;
}

.admin-light :is(.status-pill.ended, .hr-badge.red, .settlement-negative,
  .settlement-kind-card .negative, .hr-error) {
  color: var(--red);
}

.admin-light :is(.status-pill.ended, .hr-badge.red) {
  background: var(--admin-danger-soft);
}

.admin-light .role-pill.staff {
  background: #edf2fb;
  color: #3b5c8b;
  border-color: #cad8ee;
}

.admin-light :is(.hr-avatar, .member-profile-avatar) {
  background: var(--admin-accent-soft);
  color: #754b08;
}

.admin-light :is(.admin-table td, .hr-data td, .admin-user,
  .hr-panel-head, .hr-panel-foot, .hr-game, .hr-receipt) {
  border-color: var(--line);
}

.admin-light :is(.admin-table th, .hr-data th) {
  background: #f7f9fc;
  color: #4b5d72;
}

.admin-light :is(.admin-table, .hr-data) tbody tr:hover {
  background: #f8fafc;
}

.admin-light #adminMode :is([data-admin-section="members"], [data-admin-section="games"]) .admin-table tr,
.admin-light #adminMode [data-admin-section="tickets"] .ticket-history-row {
  background: #ffffff;
  border-color: var(--line);
}

.admin-light #adminMode :is(.member-phone, .mobile-game-card-meta,
  .mobile-ticket-search summary, .mobile-ticket-dates label, .mobile-ticket-result,
  .ticket-history-row small),
.admin-light #adminMode .admin-table td[data-label]::before {
  color: var(--muted);
}

.admin-light #adminMode [data-admin-section="members"] .admin-table .member-phone {
  color: var(--muted);
}

.admin-light #adminMode :is(.mobile-game-card-meta b, .mobile-ticket-result b) {
  color: var(--text);
}

.admin-light #adminMode :is(.mobile-ticket-tabs button.active,
  .mobile-ticket-secondary button.active) {
  background: var(--admin-accent-soft);
  color: #754b08;
  border-color: #e3cd98;
}

.admin-light #adminMode .admin-drawer-backdrop:not([hidden]),
.admin-light .modal-backdrop {
  background: #17223155;
}

.admin-light :is(.remote-timer-display, .timer-remote-card) {
  background: #f7f9fc;
  border-color: var(--line);
}

.admin-light .remote-timer-display strong {
  color: var(--text);
}

.admin-light .remote-timer-display span {
  color: #344255;
}

/* Tables retain clear occupied, pending, selected and empty seat states. */
.admin-light :is(.hr-seat-grid, .hr-felt) {
  background: #eaf3ed;
  color: #3c654d;
  border-color: #bfd2c4;
}

.admin-light .hr-felt small { color: #496e58; }
.admin-light .hr-seat { background: #ffffff; color: var(--text); border-color: #c5d8ca; }
.admin-light .hr-seat.empty { background: #f7fbf8; color: #5b7464; border-color: #c5d8ca; }
.admin-light .hr-seat:is(.selected, .drop) { background: var(--admin-accent-soft); border-color: #bc8c2d; }

.admin-light .satellite-game { background: var(--bg); color: var(--text); color-scheme: light; }
.admin-light .satellite-game button { background: #f4f6f9; color: #344255; border-color: var(--line); }
.admin-light .satellite-game :is(.sd-eyebrow, .sd-sub, .sd-level, .sd-legend,
  .sd-table-count, .sd-seat-meta, .sd-empty-label, .sd-move label, .sd-footer,
  .sd-foot-count, .sd-out-heading span, .sd-out-copy small, .sd-out-status,
  .sd-out-empty, .sd-out-order) { color: var(--muted); }
.admin-light .satellite-game :is(.sd-timer, .sd-table, .sd-menu, .sd-out-row,
  .sd-customer-person) { background: #ffffff; border-color: var(--line); }
.admin-light .satellite-game :is(.sd-notice, .sd-tag, .sd-felt) { background: #eaf3ed; color: #3c654d; border-color: #bfd2c4; }
.admin-light .satellite-game :is(.sd-clock, .sd-returned) { color: var(--mint); }
.admin-light .satellite-game .sd-felt-label { color: #496e58; }
.admin-light .satellite-game .sd-seat { background: #ffffff; border-color: #bfd2c4; }
.admin-light .satellite-game .sd-seat.sd-pending { background: var(--admin-accent-soft); border-color: #d7ba79; }
.admin-light .satellite-game .sd-seat.sd-out { background: #f0f3f7; border-color: #cbd5e1; }
.admin-light .satellite-game .sd-seat.sd-empty { background: #f7fbf8; color: #5b7464; border-color: #c5d8ca; }
.admin-light .satellite-game :is(.sd-pending .sd-seat-meta, .sd-rewaiting) { color: #754b08; }
.admin-light .satellite-game .sd-menu-actions .sd-danger { background: var(--admin-danger-soft); color: var(--red); border-color: #e5b4bd; }
.admin-light .satellite-game .sd-primary { background: var(--admin-accent); color: #38290e; border-color: #dfac3c; }

/* Messaging, approval alerts and connection feedback use the same surfaces. */
.admin-light .admin-chat { background: #ffffff; color: var(--text); border-color: var(--line); }
.admin-light :is(.admin-chat-head, .admin-chat-members, .admin-chat-compose) { border-color: var(--line); }
.admin-light :is(.admin-chat-compose, .admin-chat-bubble) { background: #f0f3f7; color: var(--text); }
.admin-light .admin-chat-message.mine .admin-chat-bubble { background: var(--admin-accent-soft); color: #62470b; }
.admin-light :is(.admin-chat-head small, .admin-chat-members summary, .admin-chat-members p,
  .admin-chat-author, .admin-chat-message small, .admin-chat-compose label,
  .admin-chat-compose p, [data-chat-empty], .op-notification small) { color: var(--muted); }
.admin-light #adminEntryNotifications { color: var(--text); filter: drop-shadow(0 5px 16px #20324b18); }
.admin-light :is(.entry-notice-head, .entry-notice-card, .entry-notice-more,
  .entry-notice-error) { background: #ffffff; color: var(--text); border-color: var(--line); }
.admin-light :is(.entry-notice-head span, .entry-notice-head button,
  .entry-notice-kind, .entry-notice-error button) { color: var(--lime); }
.admin-light :is(.entry-notice-store, .entry-notice-close) { color: var(--muted); }
.admin-light .entry-notice-actions button { background: #f4f6f9; color: #344255; border-color: #cfd8e3; }
.admin-light .entry-notice-actions .entry-notice-approve { background: var(--admin-accent); color: #38290e; }
.admin-light #hashSyncStatus { background: #ffffffee; color: #344255; border-color: #cbd5e1; box-shadow: 0 2px 8px #20324b12; }
.admin-light #hashSyncStatus button { background: #f0f3f7; color: #344255; border-color: #cbd5e1; }
.admin-light .toast { background: #216b4d; color: #ffffff; box-shadow: 0 5px 20px #20324b20; }

/* HASH_MOBILE_COUNTS_CONTRAST_V1 — only the light-theme mobile game totals. */
@media (max-width: 620px) {
  .admin-light .admin-game-only .mobile-game-counts {
    color: #5b6a7b;
  }
  .admin-light .admin-game-only .mobile-game-counts b {
    color: #172231;
  }
}
