/* RCTechMart Lounge Controller — shared styles */
:root {
  --bg: oklch(0.975 0.004 70);
  --surface: oklch(0.995 0.002 70);
  --surface-2: oklch(0.965 0.005 70);
  --bar: oklch(0.99 0.003 70);
  --line: oklch(0.9 0.006 70);
  --line-strong: oklch(0.85 0.007 70);
  --text: oklch(0.22 0.01 50);
  --muted: oklch(0.48 0.012 60);
  --ink: oklch(0.985 0.004 70);
  --accent: oklch(0.54 0.22 27);

  --st-free: oklch(0.48 0.012 60);
  --st-active: oklch(0.58 0.14 150);
  --st-warning: oklch(0.64 0.14 68);
  --st-timeup: oklch(0.46 0.2 25);
  --st-paused: oklch(0.56 0.13 245);
  --st-offline: oklch(0.62 0.01 60);

  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
/* Soft page texture (manage + auth; not kiosk). */
body:not(.kiosk-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../images/try_two.jpg") center / cover no-repeat;
  opacity: 0.04;
}
body:not(.kiosk-body) > .topbar,
body:not(.kiosk-body) > .shell,
body:not(.kiosk-body) > .auth {
  position: relative;
  z-index: 1;
}
/* Manage pages: page scroll lives in .main so the sidebar stays put */
body:has(.shell) {
  height: 100%;
  overflow: hidden;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
  white-space: nowrap;
  font: 500 13px var(--sans);
  text-decoration: none;
}
.btn-solid {
  background: var(--text);
  color: var(--ink);
  border: none;
  font-weight: 600;
}
.btn-solid:hover {
  background: var(--accent);
  color: var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.btn-maroon {
  background: #800000;
  color: #fff;
  border: none;
  font-weight: 700;
}
.btn-maroon:hover {
  background: #5c0000;
  color: #fff;
}
.form-actions-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-lg {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 8px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* ---------- Top bar ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.brand-logo {
  /* The PNG has wide transparent padding; negative margins trim it so the
     artwork sits close to the text and fills the bar's height */
  height: 64px;
  width: 64px;
  align-self: center;
  margin: -6px -6px -14px -10px;
}
.brand-name {
  font: 800 18px var(--sans);
  letter-spacing: -0.02em;
}
.brand-sub {
  font: 500 11px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.clock {
  font: 600 15px var(--mono);
}
.menu-toggle {
  display: none;
}

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bar), var(--surface-2));
  padding: 22px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 6px 10px -8px oklch(0 0 0 / 0.35);
}
.nav-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.54 0.22 27 / 0.12);
}
.nav-search-icon {
  font-size: 12px;
  color: var(--muted);
  flex: none;
}
.nav-search:focus-within .nav-search-icon {
  color: var(--accent);
}
.nav-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: 500 13px var(--sans);
}
.nav-search-input::placeholder {
  color: var(--muted);
}
.nav-search-input::-webkit-search-cancel-button {
  display: none;
}
.nav-search-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-2);
}
.nav-search-clear:hover {
  color: var(--ink);
  background: var(--accent);
}
.nav-no-match {
  margin: 4px 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.nav-hidden {
  display: none !important;
}
.nav-match mark {
  background: oklch(0.54 0.22 27 / 0.18);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 11px;
  border-radius: 8px;
  font: 600 13.5px var(--sans);
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nav-icon {
  width: 16px;
  flex: none;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.85;
}
.nav-link:hover {
  background: oklch(0.54 0.22 27 / 0.08);
  color: var(--accent);
}
.nav-link:hover .nav-icon {
  opacity: 1;
}
.nav-link.active {
  background: var(--text);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-link.active .nav-icon {
  color: var(--ink);
  opacity: 1;
}
.nav-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.nav-group > summary {
  cursor: pointer;
  list-style: none;
}
.nav-group > summary::-webkit-details-marker {
  display: none;
}
.nav-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.nav-group[open] > summary .nav-caret {
  transform: rotate(-135deg);
}
.nav-group > summary.active {
  background: none;
  color: var(--text);
  box-shadow: none;
}
.nav-group > summary.active .nav-icon {
  color: var(--accent);
  opacity: 1;
}
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0 8px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.nav-sub .nav-link {
  font-weight: 500;
  font-size: 12.5px;
  padding: 9px 10px;
}
.nav-sub .nav-icon {
  font-size: 11px;
  width: 14px;
  color: var(--muted);
}
.nav-sub .nav-link:hover .nav-icon {
  color: var(--accent);
}
.nav-soon {
  font: 500 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sidebar-user {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-user strong {
  font: 600 13px var(--sans);
}
.sidebar-user span {
  font-size: 12px;
  color: var(--muted);
}
.sidebar-user a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 12px var(--sans);
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 7px;
  text-decoration: none;
  background: oklch(0.54 0.22 27 / 0.1);
  color: var(--accent);
}
.sidebar-user a:hover {
  background: var(--accent);
  color: var(--ink);
}

.main {
  padding: 34px 28px 32px;
  scroll-behavior: smooth;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---------- Page heading ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-title {
  font: 700 26px var(--sans);
  letter-spacing: -0.02em;
  margin: 0;
}
.page-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Cards / KPIs ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: var(--surface);
  scroll-margin-top: 18px;
}
.card-title {
  font: 600 15px var(--sans);
  margin: 0 0 14px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(192px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.start{
  /* margin-bottom: 20% !important; */
}
.kpi-label {
  font-size: 13px;
  color: var(--muted);
}
.kpi-value {
  font: 600 30px var(--mono);
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.kpi-unit {
  font-size: 18px;
  color: var(--muted);
}

/* Tone colors shared by KPI cards and accented sections */
.tone-revenue {
  --tone: var(--accent);
}
.tone-active {
  --tone: var(--st-active);
}
.tone-paused {
  --tone: var(--st-paused);
}
.tone-warning {
  --tone: var(--st-warning);
}
.tone-timeup {
  --tone: var(--st-timeup);
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  border-left: 3px solid var(--tone, var(--line));
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--tone, var(--line)) 9%, transparent), transparent 62%),
    var(--surface);
  transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card.is-link {
  cursor: pointer;
}
.kpi-card.is-link:hover {
  transform: translateY(-2px);
  border-color: var(--tone, var(--line));
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.09);
}
.kpi-card.is-link:hover .kpi-go {
  opacity: 1;
  transform: none;
}
.kpi-card.is-link:focus-visible {
  outline: 2px solid var(--tone, var(--accent));
  outline-offset: 2px;
}
.kpi-go {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  color: var(--tone, var(--muted));
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.kpi-body {
  min-width: 0;
}
.kpi-card .kpi-value {
  margin-top: 2px;
  overflow-wrap: anywhere;
}
/* Small note under a KPI value (e.g. "Overtime" on the Sales sheet) */
.kpi-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.kpi-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 17px;
  color: var(--tone, var(--muted));
  background: color-mix(in oklch, var(--tone, var(--line)) 14%, transparent);
}
.kpi-card.is-live .kpi-icon {
  color: var(--ink);
  background: var(--tone);
  animation: kpi-pulse 1.8s ease-in-out infinite;
}
@keyframes kpi-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in oklch, var(--tone) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 7px color-mix(in oklch, var(--tone) 0%, transparent);
  }
}
.card-accent {
  border-top: 3px solid var(--tone, var(--line));
}
.card-title-icon {
  color: var(--accent);
  font-size: 13px;
  margin-right: 2px;
}
.card-title-icon.is-warning {
  color: var(--st-warning);
}
.card-title-icon.is-paused {
  color: var(--st-paused);
}
.page-title-icon {
  color: var(--accent);
  font-size: 21px;
  margin-right: 4px;
}
.page-head-hero .page-sub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 12px var(--sans);
  border: 1px solid color-mix(in oklch, var(--pill, var(--line)) 35%, transparent);
  background: color-mix(in oklch, var(--pill, var(--line)) 11%, transparent);
  color: var(--pill, var(--muted));
}
.pill.is-active {
  --pill: var(--st-active);
}
.pill.is-free {
  --pill: var(--st-free);
}
.pill.is-offline {
  --pill: var(--st-offline);
}
.pill.is-warning {
  --pill: var(--st-warning);
}
.pill.is-timeup {
  --pill: var(--st-timeup);
}
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ---------- Station / screen tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.tiles > .empty {
  grid-column: 1 / -1;
}
.tile {
  border: 1px solid var(--line);
  border-top: 3px solid var(--tile-color, var(--st-free));
  border-radius: 8px;
  padding: 14px 12px;
  width: 100%;
  height: 168px;
  min-height: 168px;
  max-height: 168px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
}
.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.tile-name {
  font: 700 14px var(--sans);
}
.tile-time {
  font: 500 15px var(--mono);
  flex: none;
}
.tile-who {
  font: 500 12px/1.3 var(--sans);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile .progress {
  display: block;
  width: 100%;
}
.tile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.tile-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tile-meta > div > span {
  font: 600 9px/1.2 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(0.55 0.01 60);
}
.tile-meta strong {
  font: 650 12px/1.25 var(--sans);
  overflow-wrap: anywhere;
}
.tile.has-session {
  height: 168px;
  min-height: 168px;
  max-height: 168px;
  justify-content: flex-start;
}
.game-cover-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  /* Zoom crops dark frames common on square cover art */
  transform: scale(1.28);
  transform-origin: center center;
}
.screen-card.has-game .game-cover-fill {
  transform: scale(1.35);
}
.time-box.has-game .game-cover-fill {
  /* Wide panels need more zoom so pillarbox edges disappear */
  transform: scale(1.55);
}
.tile.has-game {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background-color: #2a221c;
  overflow: hidden;
  isolation: isolate;
}
.tile.has-game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.12), rgba(12, 10, 8, 0.52));
  pointer-events: none;
}
.tile.has-game > *:not(.game-cover-fill) {
  position: relative;
  z-index: 2;
}
.tile.has-game .tile-who,
.tile.has-game .tile-meta > div > span {
  color: rgba(255, 255, 255, 0.72);
}
.tile.has-game .tile-meta {
  border-top-color: rgba(255, 255, 255, 0.18);
}
.tile.has-game .tile-meta strong,
.tile.has-game .tile-name,
.tile.has-game .tile-time {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.tile.has-game .progress {
  background: rgba(255, 255, 255, 0.22);
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
  background: var(--dot, var(--st-free));
}

.is-free {
  --tile-color: var(--st-free);
  --dot: var(--st-free);
}
.is-active {
  --tile-color: var(--st-active);
  --dot: var(--st-active);
}
.is-warning {
  --tile-color: var(--st-warning);
  --dot: var(--st-warning);
}
.is-timeup {
  --tile-color: var(--st-timeup);
  --dot: var(--st-timeup);
}
.is-paused {
  --tile-color: var(--st-paused);
  --dot: var(--st-paused);
}
.is-offline {
  --tile-color: var(--st-offline);
  --dot: var(--st-offline);
}
.is-warning .tile-time,
.is-timeup .tile-time,
.is-paused .tile-time {
  color: var(--tile-color);
}
.is-free .tile-time,
.is-offline .tile-time {
  color: oklch(0.68 0.01 60);
}

/* ---------- List rows ---------- */
.list {
  display: flex;
  flex-direction: column;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  margin-inline: -8px;
  border-top: 1px solid oklch(0.91 0.006 70);
  border-radius: 8px;
  font-size: 14px;
}
.list-row:first-child {
  border-top: none;
  padding-top: 0;
}
.list-row:hover {
  background: var(--surface-2);
}
.list-main {
  flex: 1;
  min-width: 0;
}
.list-title {
  font: 600 14px var(--sans);
}
.list-sub {
  font-size: 13px;
  color: var(--muted);
}
.list-time {
  font: 600 14px var(--mono);
  width: 48px;
  flex: none;
}
.empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.empty .fas {
  color: var(--st-active);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 10px;
  font: 600 14px var(--sans);
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.15);
  z-index: 50;
}
[hidden] {
  display: none !important;
}

/* ---------- Login ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth-panel {
  background: var(--text);
  color: var(--ink);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-panel .brand-sub {
  color: oklch(0.72 0.01 60);
}
.auth-panel h2 {
  font: 800 44px var(--sans);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
}
.auth-panel p {
  color: oklch(0.78 0.01 60);
  font-size: 16px;
  line-height: 1.5;
  max-width: 420px;
  margin: 0;
}
.auth-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font: 500 12px var(--mono);
  color: oklch(0.78 0.01 60);
}
.auth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-form-logo {
  /* Negative margins trim the PNG's transparent padding */
  height: 160px;
  width: 160px;
  align-self: center;
  margin: -14px 0 -22px;
}
.auth-form h1 {
  font: 700 26px var(--sans);
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}
.auth-form .page-sub {
  margin: 0 0 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.field input {
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 15px;
}
.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  width: 100%;
  padding-right: 64px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font: 600 12px var(--sans);
  cursor: pointer;
  padding: 6px;
}
.pw-toggle:hover {
  color: var(--accent);
}
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-row a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-row a.muted,
.auth-row a.muted:visited {
  color: var(--muted);
  font-weight: 500;
}
.auth-row a.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}
.auth-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 2FA verification OTP inputs */
.twofa-otp {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.25rem 0 0.5rem;
}
.twofa-otp__cell {
  width: 3rem;
  height: 3.25rem;
  border: 1.5px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.twofa-otp__cell:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 28%, transparent);
}
.twofa-otp.is-success .twofa-otp__cell {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: none;
  color: #166534;
}
.twofa-otp.is-error .twofa-otp__cell {
  border-color: #ef4444;
  background: #fef2f2;
}
.twofa-otp-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.15rem 0 0.35rem;
  color: #16a34a;
  font-weight: 600;
  font-size: 0.95rem;
}
.twofa-otp-success.d-none,
.d-none {
  display: none !important;
}
.twofa-otp-success__icon {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}
.twofa-countdown {
  text-align: center;
  font-size: 13px;
  margin: 0;
}
.twofa-expired {
  color: oklch(0.45 0.16 27);
  font-weight: 600;
}
@media (max-width: 420px) {
  .twofa-otp {
    gap: 0.4rem;
  }
  .twofa-otp__cell {
    width: 2.55rem;
    height: 2.9rem;
    font-size: 1.15rem;
  }
}
.alert {
  border: 1px solid oklch(0.8 0.1 27);
  background: oklch(0.97 0.02 27);
  color: oklch(0.42 0.16 27);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}
.alert-info {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}
[data-toast] {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  padding: 12px 14px 12px 16px;
  border-radius: 8px;
  font: 600 14px var(--sans);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  animation: toast-in 0.25s ease-out;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
[data-toast].is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}
[data-toast].toast-red {
  background: var(--st-timeup);
  color: #fff;
}
[data-toast] .toast-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
}
[data-toast] .toast-close:hover {
  opacity: 1;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Shared bits for inner pages ---------- */
.nav-badge {
  font: 600 11px var(--mono);
  background: var(--accent);
  color: var(--ink);
  border-radius: 10px;
  padding: 2px 7px;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 6px;
  color: var(--muted);
  font: 500 12px var(--sans);
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover {
  color: var(--accent);
}
.inline-form {
  display: inline;
  margin: 0;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row-gap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row-gap > * {
  flex: 1;
}
.section-label {
  font: 600 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: oklch(0.52 0.01 60);
  margin: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px var(--sans);
  color: var(--dot);
}
.badge {
  font: 600 11px var(--sans);
  color: var(--ink);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 5px;
}
.badge-outline {
  font: 500 11px var(--sans);
  color: oklch(0.4 0.012 60);
  border: 1px solid var(--line-strong);
  padding: 2px 8px;
  border-radius: 5px;
}
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 15px;
}
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
/* Dropdown with a plus button attached on the right */
.select-add {
  display: flex;
}
.select-add select {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.select-add-btn {
  flex: 0 0 46px;
  border: none;
  border-radius: 0 8px 8px 0;
  background: #800000;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.select-add-btn:hover,
.select-add-btn[aria-expanded="true"] {
  background: #5c0000;
}
.select-add-row {
  display: flex;
  gap: 8px;
}
.select-add-row input {
  flex: 1;
  min-width: 0;
}
/* Station models modal: add row plus rename / delete list */
.station-model-card {
  width: min(520px, calc(100vw - 32px));
  padding: 22px;
}
.station-model-card .game-modal-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.station-model-card input[type="text"] {
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 15px;
}
.model-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.model-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.model-list-row input {
  flex: 1;
  min-width: 0;
}
.model-list-count {
  white-space: nowrap;
  font-size: 12px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.conn-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
}
.conn-fields .field {
  min-width: 0;
}
.conn-fields .field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.conn-fields .field input[readonly] {
  background: var(--bg);
  color: var(--text);
  cursor: default;
}
.conn-fields .field input[readonly]:focus {
  outline: none;
  border-color: oklch(0.87 0.007 70);
}
.floor > .panel {
  position: sticky;
  top: 76px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.btn-danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid oklch(0.8 0.1 27);
}
.btn-danger:hover {
  background: oklch(0.97 0.02 27);
}
.btn-block {
  width: 100%;
}

/* Pill radio groups */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  flex: 1;
  position: relative;
}
.pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.pill span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
  font: 600 13px var(--sans);
  text-align: center;
}
.pill span small {
  font: 500 12px var(--mono);
  color: var(--muted);
}
.pill input:checked + span {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
}
.pill input:checked + span small {
  color: oklch(0.8 0.01 60);
}
.pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pill span:hover {
  border-color: var(--accent);
}

/* Tables */
.table-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: visible;
  background: var(--surface);
}
.table-card-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 4px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 10px 16px;
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: oklch(0.52 0.01 60);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-top: 1px solid oklch(0.91 0.006 70);
  vertical-align: middle;
  white-space: nowrap;
}
.table td.strong {
  font-weight: 600;
}
.table tfoot td {
  font-weight: 600;
  background: var(--surface-2);
}
.table .num {
  text-align: right;
  font-family: var(--mono);
  white-space: nowrap;
}

/* Account difference — close form spans the content width */
.difference-close-form.booking-card {
  width: 100%;
  max-width: none;
  margin-top: 0;
}

/* Sales sheet — totals bar (aligns with centered header/body columns) */
.sales-sheet .table tfoot tr.sales-totals td {
  position: relative;
  padding: 16px 16px 18px;
  border-top: none;
  text-align: center;
  background:
    linear-gradient(var(--text), var(--text)) 0 0 / 100% 2px no-repeat,
    oklch(0.955 0.008 55);
  color: var(--text);
  font: 600 13px var(--mono);
  letter-spacing: 0;
  text-transform: none;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.55);
}
.sales-sheet .table tfoot tr.sales-totals td:first-child {
  font-family: var(--sans);
  font-weight: 500;
}
.sales-sheet .table tfoot tr.sales-totals td.num {
  text-align: center;
}
.sales-totals-label {
  display: block;
  font: 600 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.sales-totals-sub {
  display: block;
  margin-top: 3px;
  font: 400 11px var(--sans);
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.sales-sheet .table tfoot td.sales-totals-focus {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sales-sheet .table tfoot td.sales-totals-ext {
  color: var(--accent);
}
.search {
  width: 280px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

/* Floor */
.floor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 20px;
  align-items: start;
}
/* Staff page: form on top, table below — both full width */
.staff-page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}
.staff-page-stack > .panel,
.staff-page-stack > .table-card,
.staff-page-stack > .booking-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.staff-page-stack > .panel {
  position: static;
}
/* Expenses: quick add + recurring side by side */
.expense-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.expense-form-row > .booking-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}
.expense-form-row > .booking-card > .booking-card-body {
  flex: 1;
}
@media (max-width: 900px) {
  .expense-form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Hint icon + floating tooltip (assets page) */
.hint {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 12px;
  color: var(--muted);
  cursor: help;
  vertical-align: middle;
  border-radius: 50%;
}
.hint:hover,
.hint:focus-visible {
  color: var(--st-paused);
  outline: none;
}
.hint:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--st-paused) 35%, transparent);
}
.hint-tip {
  position: fixed;
  z-index: 400;
  max-width: min(300px, calc(100vw - 16px));
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--ink);
  font: 500 12.5px/1.45 var(--sans);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.18);
  pointer-events: none;
}
.hint-tip[hidden] {
  display: none;
}

/* Assets form: grouped sections + live figures */
.asset-form .booking-card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.asset-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.asset-fieldset[hidden],
.asset-form [data-asset-for][hidden] {
  display: none;
}
.asset-fieldset legend {
  padding: 0;
  margin-bottom: 10px;
  font: 600 12px var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.asset-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}
.asset-preview b {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
}
.asset-preview:empty {
  display: none;
}
.asset-warn {
  color: var(--st-warning);
  font-weight: 600;
}

/* Assets table */
.asset-name {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 600 14px var(--sans);
  text-align: left;
  cursor: pointer;
}
.asset-name:hover,
.asset-name:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}
.asset-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Asset details modal */
.asset-modal-card {
  width: min(820px, 100%);
}
.asset-modal-card .game-modal-head p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.asset-section + .asset-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.asset-section h3 {
  margin: 0 0 10px;
  font: 600 12px var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.asset-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
}
.asset-dl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.asset-dl dt {
  flex: none;
  font-size: 13px;
  color: var(--muted);
}
.asset-dl dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.asset-history {
  overflow-x: auto;
}
.asset-modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
@media (max-width: 640px) {
  .asset-dl {
    grid-template-columns: minmax(0, 1fr);
  }
  #asset_modal {
    padding: 12px;
  }
}
.staff-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
@media (max-width: 900px) {
  .staff-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Staff: form + table share the page equally (6/6), same height */
.staff-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.staff-layout > .panel,
.staff-layout > .table-card,
.staff-layout > .booking-card,
.staff-layout > .finance-panel,
.staff-layout > .stack {
  min-width: 0;
  width: 100%;
  min-height: 100%;
  position: static;
  box-sizing: border-box;
}
.staff-layout > .panel {
  position: static;
}
.staff-layout > .booking-card.finance-form {
  max-width: none;
}
.staff-layout > .stack > .table-card {
  flex: 1;
}
.staff-layout > .table-card {
  display: flex;
  flex-direction: column;
}
.staff-layout > .table-card .dt-container {
  flex: 1;
}
.staff-layout .staff-submit .btn {
  width: 100%;
  height: 100%;
  min-height: 44px;
}
@media (max-width: 1100px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }
}
body.modal-open {
  overflow: hidden;
}
.floor-start {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.floor-start .section-label {
  margin: 6px 0 2px;
}
.floor-start [data-floor-panel-walkin],
.floor-start [data-floor-panel-checkin] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.floor-start [hidden] {
  display: none !important;
}
.floor-start .field {
  gap: 8px;
}
.floor-start .pills,
.floor-start-form .pills,
.panel .pills {
  gap: 10px;
}
.floor-start .pill span,
.panel .pill span {
  padding: 11px 10px;
}
.floor-start .btn,
.floor-start-form > .btn,
.panel.stack > .btn {
  margin-top: 2px;
}
.panel .row-gap,
.floor-start-form .row-gap {
  gap: 10px;
}
.floor-start-form.stack {
  gap: 16px;
}
.game-pick {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px dashed oklch(0.78 0.01 60);
  border-radius: 14px;
  background:
    linear-gradient(180deg, oklch(0.995 0.002 70), oklch(0.975 0.004 70));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.game-pick:hover {
  border-color: oklch(0.55 0.02 60);
  border-style: solid;
  box-shadow: 0 8px 20px oklch(0.22 0.01 50 / 0.06);
}
.game-pick.is-set {
  border-style: solid;
  border-color: var(--line-strong);
  background: var(--surface);
}
.game-pick-cover {
  width: 56px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.93 0.008 70);
  color: oklch(0.42 0.01 60);
  font-size: 16px;
  border: 1px solid var(--line);
}
.game-pick-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-pick-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.game-pick-copy strong {
  font: 700 15px/1.25 var(--sans);
  letter-spacing: -0.01em;
}
.game-pick-copy span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.game-pick-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--ink);
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.02em;
}
.game-pick:hover .game-pick-action,
.game-pick.is-set .game-pick-action {
  background: var(--accent);
}
.floor-rates[hidden] {
  display: none;
}
.rate-pills,
.pills.is-blocks {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.rate-pills .rate-pill,
.pills.is-blocks > .pill {
  flex: 0 0 108px;
  width: 108px;
  scroll-snap-align: start;
}
.rate-pills .rate-pill span {
  width: 100%;
}
.kiosk-stations.is-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}
.kiosk-stations.is-blocks > form {
  width: 100%;
  min-width: 0;
}
.kiosk-stations.is-blocks .kiosk-station {
  width: 100%;
  height: 88px;
  min-height: 88px;
  max-height: 88px;
  padding: 10px 12px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.rate-pill {
  display: block;
  cursor: pointer;
}
.rate-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rate-pill span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.rate-pill span b {
  font: 650 14px/1.2 var(--sans);
}
.rate-pill span small {
  color: var(--muted);
  font-size: 12px;
}
.rate-pill input:checked + span {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--text);
}
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 24, 20, 0.5);
}
.game-modal[hidden] {
  display: none !important;
}
.game-modal.is-open {
  display: flex !important;
}
.game-modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 820px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(28, 24, 20, 0.22);
  padding: 20px;
}
.game-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.game-modal-head h2 {
  margin: 0;
  font: 700 22px/1.2 var(--sans);
  letter-spacing: -0.02em;
}
.game-modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.game-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}
.game-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.game-tile:hover .game-tile-cover,
.game-tile:focus-visible .game-tile-cover {
  border-color: var(--text);
}
.game-tile-cover {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: oklch(0.94 0.008 70);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 22px;
}
.game-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-tile-name {
  font: 600 13px/1.3 var(--sans);
  padding: 0 2px 4px;
}
.panel.stack {
  gap: 16px;
}
.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.station-grid > .empty {
  grid-column: 1 / -1;
}
.station-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  box-sizing: border-box;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}
.station-card:hover {
  border-color: var(--accent);
  color: var(--text);
}
.device-card {
  min-height: 0;
}
.device-card > .inline-form {
  display: block;
  width: 100%;
}
.device-card .row-gap .inline-form {
  display: flex;
  width: auto;
}
.screen-card {
  overflow: hidden;
  min-width: 0;
  position: relative;
  isolation: isolate;
}
.screen-card.has-game {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background-color: #2a221c;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  overflow: hidden;
  isolation: isolate;
}
.screen-card.has-game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 8, 6, 0.55) 0%, rgba(10, 8, 6, 0.28) 40%, rgba(10, 8, 6, 0.72) 100%);
  pointer-events: none;
}
.screen-card.has-game > *:not(.game-cover-fill) {
  position: relative;
  z-index: 2;
}
.screen-card.has-game .screen-card-top small,
.screen-card.has-game .station-who {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
.screen-card.has-game .status {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.screen-card.has-game .screen-card-time {
  font: 700 32px/1 var(--mono);
  letter-spacing: -0.04em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}
.screen-card.has-game .screen-card-top b {
  font: 750 20px/1.25 var(--sans);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
.screen-card.has-game .screen-card-top small {
  font: 500 13px/1.3 var(--mono);
  margin-top: 4px;
}
.screen-card.has-game .status {
  font-size: 13px;
  margin-top: 6px;
}
.screen-card.has-game .station-who {
  font-size: 13px;
  margin-top: 4px;
}
.screen-card.has-game .progress {
  background: rgba(255, 255, 255, 0.28);
  height: 5px;
}
.screen-card.has-game.selected {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.screen-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  column-gap: 12px;
  row-gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.screen-card-time {
  font: 600 22px/1 var(--mono);
  letter-spacing: -0.03em;
  text-align: right;
}
.screen-card-top .progress {
  grid-column: 1 / -1;
  grid-row: 2;
}
.screen-card-meta {
  grid-column: 1 / -1;
  grid-row: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.screen-card-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.screen-card-meta span {
  font: 600 10px/1.2 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(0.55 0.01 60);
}
.screen-card-meta strong {
  font: 650 13px/1.25 var(--sans);
  overflow-wrap: anywhere;
}
.screen-card.has-game .screen-card-meta {
  margin-top: auto;
  padding: 12px;
  border-top: none;
  border-radius: 10px;
  background: rgba(8, 6, 5, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  gap: 10px 14px;
}
.screen-card.has-game .screen-card-meta span {
  font: 650 11px/1.2 var(--sans);
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.78);
}
.screen-card.has-game .screen-card-meta strong {
  font: 700 15px/1.3 var(--sans);
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.screen-card.has-session {
  height: 260px;
  min-height: 260px;
  max-height: 260px;
}
.screen-card-top .station-who {
  margin-top: 6px;
}
.screen-card-top.is-warning .screen-card-time,
.screen-card-top.is-timeup .screen-card-time {
  color: var(--dot);
}
.screen-card-top > div {
  min-width: 0;
  max-width: 100%;
}
.screen-card-top b {
  display: block;
  font: 700 16px/1.3 var(--sans);
  overflow-wrap: anywhere;
}
.screen-card-top small {
  display: block;
  margin: 3px 0 0;
  font: 500 11px var(--mono);
  color: oklch(0.55 0.01 60);
}
.station-card.selected {
  background-color: oklch(0.945 0.006 70);
  border-color: var(--muted);
}
.station-card.has-game.selected {
  background-color: #2a221c;
}
.station-card.is-timeup {
  border-color: oklch(0.8 0.09 28);
}
.station-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.station-top b {
  font: 700 17px var(--sans);
}
.station-top small {
  font: 500 11px var(--mono);
  color: oklch(0.55 0.01 60);
  margin-left: 6px;
}
.station-time {
  font: 500 30px var(--mono);
  letter-spacing: -0.03em;
}
.station-who {
  font-size: 13px;
  color: oklch(0.44 0.012 60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--dot);
}
.station-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.is-warning .station-time,
.is-timeup .station-time {
  color: var(--dot);
}
.is-paused .station-time {
  color: var(--st-paused);
}
.is-free .station-time,
.is-offline .station-time {
  color: oklch(0.68 0.01 60);
}
.panel {
  position: static;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.panel-head h2 {
  font: 700 24px var(--sans);
  letter-spacing: -0.02em;
  margin: 0;
}
.time-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--bg);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.time-box .big {
  font: 500 44px var(--mono);
  letter-spacing: -0.03em;
  margin: 4px 0 10px;
}
/* Cover fills the box; timer uses shadow, details sit on a soft plate */
.time-box.has-game {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background-color: #2a221c;
}
.time-box.has-game::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(14, 11, 9, 0.42) 0%, rgba(14, 11, 9, 0.22) 45%, rgba(14, 11, 9, 0.5) 100%);
  pointer-events: none;
}
.time-box.has-game > *:not(.game-cover-fill) {
  position: relative;
  z-index: 2;
}
.time-box.has-game .muted {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.time-box.has-game .big {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}
.time-box.has-game .progress {
  background: rgba(255, 255, 255, 0.3);
}
.time-box.has-game .details {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(8, 6, 5, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.time-box.has-game .details dt {
  color: rgba(255, 255, 255, 0.72);
}
.time-box.has-game .details dd {
  color: #fff;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 14px;
  font-size: 13px;
}
.details dt {
  color: oklch(0.52 0.01 60);
}
.details dd {
  margin: 2px 0 0;
  font-weight: 600;
}
.request-box {
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.receipt {
  background: var(--text);
  color: oklch(0.975 0.004 70);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
}
.receipt h3 {
  font: 700 15px var(--sans);
  margin: 0;
}
.receipt .sub {
  font-size: 12px;
  color: oklch(0.72 0.01 60);
}
.receipt hr {
  border: none;
  border-top: 1px dashed oklch(0.5 0.01 60);
  margin: 0;
  width: 100%;
}
.receipt .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.receipt .total {
  font-weight: 700;
  font-size: 16px;
}
.receipt-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  text-align: center;
}
.receipt-code span {
  font: 650 11px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.72 0.01 60);
}
.receipt-code strong {
  font: 800 36px/1 var(--mono);
  letter-spacing: 0.18em;
  color: #fff;
}
.booking-receipt-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(240px, 320px);
  gap: 18px;
  align-items: start;
  max-width: 780px;
}
.booking-receipt-card {
  min-width: 0;
}
.booking-side {
  min-width: 0;
}
.booking-side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.booking-side-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.booking-side-head h2 {
  margin: 0;
  font: 700 15px/1.2 var(--sans);
  color: var(--text);
}
.booking-next-steps {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.booking-next-steps p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

/* Revenue chart */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 200px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.bar {
  width: 100%;
  min-height: 2px;
  background: oklch(0.84 0.01 60);
  border-radius: 4px 4px 0 0;
}
.bar-col.current .bar {
  background: var(--accent);
}
.bar-col:hover .bar {
  filter: brightness(0.92);
}
.bar-val,
.bar-label {
  font: 500 11px var(--mono);
  color: var(--muted);
}
/* 30-day charts: tighter bars, values on hover only */
.bars-dense {
  gap: 3px;
}
.bars-dense .bar-val {
  display: none;
}
.range-switch {
  display: flex;
  gap: 6px;
}
.pager {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 0;
  font-size: 13px;
  color: var(--muted);
}
.pager-per select {
  margin-left: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 8px;
  color: var(--text);
  font: inherit;
}
.pager-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pager-links .btn {
  min-width: 32px;
  padding: 6px 9px;
}
.pager-gap {
  padding: 0 4px;
}
.mix-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mix-row .top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.mix-row .progress {
  height: 6px;
  border-radius: 3px;
}
.mix-row .progress > i {
  background: var(--accent);
}
details.table-toggle summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  max-width: 760px;
}
.price-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-input span {
  font: 600 22px var(--mono);
  color: var(--muted);
}
.price-input input {
  width: 100%;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  font: 600 22px var(--mono);
}
.price-input-sm span,
.price-input-sm input {
  font-size: 14px;
}
.price-input-sm input {
  padding: 8px 10px;
}

.price-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.sheet-head {
  padding: 18px 20px 14px;
}
.sheet-head h2 {
  margin: 0;
  font: 600 16px var(--sans);
  letter-spacing: -0.01em;
}
.sheet-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.sheet .table-card {
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
}
.sheet-add,
.sheet-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.sheet-add {
  background: var(--surface-2);
}
.rate-line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.9fr) max-content;
  gap: 12px;
  align-items: end;
  padding: 16px 20px;
}
.rate-line > * {
  min-width: 0;
}
#game_form {
  border-bottom: 1px solid var(--line);
}
.rate-line .field {
  margin: 0;
  min-width: 0;
}
.rate-line .field > input,
.rate-input {
  width: 100%;
  height: 40px;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font: 500 14px var(--sans);
}
.rate-input:focus,
.rate-line .field > input:focus,
.rate-money:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.rate-line .btn {
  height: 40px;
  min-width: 40px;
  padding: 0;
}
.icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
}
.icon-btn i {
  font-size: 13px;
  line-height: 1;
}
.icon-btn-quiet {
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  color: var(--muted);
}
.icon-btn-quiet:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}
.icon-btn-add,
.icon-btn-save {
  background: oklch(0.46 0.13 145);
  border: 0;
  color: white;
}
.icon-btn-add:hover,
.icon-btn-save:hover {
  background: oklch(0.4 0.13 145);
  color: white;
}
.icon-btn-cancel {
  background: oklch(0.97 0.02 25);
  border: 1px solid oklch(0.88 0.04 25);
  color: oklch(0.5 0.18 25);
}
.icon-btn-cancel:hover {
  background: oklch(0.94 0.04 25);
  color: oklch(0.42 0.18 25);
}
.price-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: end;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.price-create .field {
  margin: 0;
}
.price-create .field input {
  height: 40px;
  padding: 0 12px;
}
.price-create-actions {
  display: flex;
  gap: 6px;
}
.price-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}
.price-table .col-game { width: 36%; }
.price-table .col-duration { width: 22%; }
.price-table .col-price { width: 24%; }
.price-table .col-actions { width: 18%; }
.price-table th,
.price-table td {
  padding: 14px 18px;
}
.price-table th.price-col,
.price-table th.actions-col {
  text-align: right;
}
.price-table .game-cell {
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.price-table tr.game-block > td {
  border-top: 1px solid var(--line-strong);
}
.price-table tbody tr:first-child > td {
  border-top-color: var(--line);
}
.price-table tr.game-rate > td {
  border-top: 1px solid oklch(0.94 0.004 70);
}
.price-table .duration-cell {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.price-table .price-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-table .price-cell .mono {
  font-weight: 500;
}
.price-table .actions-cell {
  text-align: right;
}
.price-table .actions-cell .act-group {
  justify-content: flex-end;
}
.price-table .rate-input,
.price-table .rate-money {
  height: 36px;
}
.price-table .duration-cell .rate-input {
  max-width: 120px;
}
.price-table .price-cell .rate-money {
  margin-left: auto;
  max-width: 150px;
}
.price-table tr.is-editing .game-cell {
  box-shadow: inset 3px 0 0 var(--accent);
}
.price-table tr.is-add td {
  background: var(--surface-2);
}
.game-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.game-form > input[type="hidden"] {
  display: none;
}
#game_edit.game-form {
  grid-template-columns: auto minmax(0, 1fr) max-content;
  align-items: end;
}
.game-form-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: end;
  min-width: 0;
}
.game-form-fields > * {
  min-width: 0;
}
.game-form .field {
  margin: 0;
}
.game-form .field > input {
  height: 40px;
  padding: 0 12px;
}
.cover-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}
.cover-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.cover-frame,
.game-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.cover-frame {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}
.cover-frame img,
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cover-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.cover-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.game-cell {
  vertical-align: middle;
}
.game-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.game-thumb {
  width: 46px;
  height: 64px;
  border-radius: 6px;
}
.game-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.game-meta .strong {
  font: 600 14px/1.3 var(--sans);
  letter-spacing: -0.01em;
}
.act-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.act-group .act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.act-group .act-edit {
  background: oklch(0.95 0.03 250);
  color: oklch(0.45 0.16 250);
}
.act-group .act-edit:hover {
  background: oklch(0.91 0.05 250);
  color: oklch(0.38 0.16 250);
}
.act-group .act-print {
  background: oklch(0.95 0.02 240);
  color: oklch(0.4 0.08 240);
}
.act-group .act-remove {
  background: oklch(0.96 0.03 75);
  color: oklch(0.5 0.14 65);
}
.act-group .act-remove:hover {
  background: oklch(0.92 0.05 75);
  color: oklch(0.42 0.14 65);
}
.act-group .act-danger {
  background: oklch(0.96 0.02 25);
  color: oklch(0.5 0.18 25);
}
.act-group .act-danger:hover {
  background: oklch(0.92 0.05 25);
  color: oklch(0.42 0.18 25);
}
.act-group .act-add,
.act-group .act-save {
  background: oklch(0.46 0.13 145);
  color: white;
}
.act-group .act-add:hover,
.act-group .act-save:hover {
  background: oklch(0.4 0.13 145);
  color: white;
}
.act-group .act i {
  font-size: 12px;
  line-height: 1;
}
@media (max-width: 860px) {
  .game-form,
  #game_edit.game-form,
  .game-form-fields {
    grid-template-columns: 1fr;
  }
}
.game-remove,
.rate-remove,
.rate-save,
.rate-add,
.station-remove {
  display: none;
}
.console-price-card {
  width: min(640px, calc(100vw - 32px));
  padding: 22px 22px 18px;
}
.console-price-card .game-modal-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.console-price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.console-price-table th,
.console-price-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.console-price-table thead th {
  background: var(--surface-2);
  font: 600 11px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.console-price-table thead th:not(:first-child),
.console-price-table td {
  text-align: right;
}
.console-price-table tbody th {
  width: 92px;
  white-space: nowrap;
  font-weight: 600;
  background: #fff;
}
.console-price-table tbody tr:last-child th,
.console-price-table tbody tr:last-child td {
  border-bottom: 0;
}
.console-price-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: 700 13px var(--sans);
  letter-spacing: 0.02em;
}
.console-price-cell {
  display: block;
}
.console-price-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.console-price-card .rate-money {
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.console-price-card .rate-money:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.54 0.22 27 / 0.18);
}
.console-price-card .rate-money input {
  font: 600 15px/1 var(--mono);
  letter-spacing: -0.02em;
  appearance: textfield;
  -moz-appearance: textfield;
}
.console-price-card .rate-money input::-webkit-outer-spin-button,
.console-price-card .rate-money input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}
.console-price-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.console-price-actions .btn {
  min-width: 112px;
  padding: 10px 16px;
}
/* Add new time panel inside the console price modal */
.console-time-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2, oklch(0.97 0.005 250));
}
.console-time-form[hidden] {
  display: none;
}
.console-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.console-time-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.console-time-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.console-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.console-time-row input {
  width: 90px;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 14px;
}
.console-time-row .console-time-chip {
  margin-right: auto;
}
.console-time-chip {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font: 500 12px var(--sans);
  cursor: pointer;
}
.console-time-chip:hover {
  border-color: #800000;
  color: #800000;
}
/* Session history: money charged but not covered by a paid payment */
.history-owed {
  color: var(--st-timeup, #b42318);
  font-size: 12px;
  font-weight: 600;
}
/* Per-station time and price pills in the stations table */
.station-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 360px;
}
.station-rate {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2, oklch(0.97 0.005 250));
  font-size: 12px;
  white-space: nowrap;
}
.station-rate.is-unpriced {
  color: var(--muted);
  border-style: dashed;
}
/* One block per console, showing only that console's times */
.console-price-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.console-price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
}
.console-price-group + .console-price-group {
  border-top: 1px solid var(--line);
}
/* Times stay on one row and scroll sideways */
.console-price-times {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.console-price-times .console-price-cell {
  flex: 0 0 140px;
  scroll-snap-align: start;
}
.console-price-group {
  min-width: 0;
}
.console-price-time {
  display: block;
  margin-bottom: 4px;
  font: 600 12px var(--sans);
  color: var(--muted);
}
.console-price-none {
  font-size: 13px;
}
.console-price-cell.is-new .rate-money {
  border-color: #800000;
  box-shadow: 0 0 0 2px rgb(128 0 0 / 0.15);
}
@media (max-width: 560px) {
  .console-time-fields {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .console-price-table,
  .console-price-table tbody,
  .console-price-table tr,
  .console-price-table th,
  .console-price-table td {
    display: block;
    width: 100%;
  }
  .console-price-table thead {
    display: none;
  }
  .console-price-table tbody th {
    width: auto;
    background: var(--surface-2);
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }
  .console-price-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    padding: 10px 14px;
  }
  .console-price-table td::before {
    content: attr(data-label);
    font: 600 12px var(--sans);
    color: var(--muted);
  }
  .console-price-cell {
    flex: 1;
    max-width: 200px;
  }
}
.rate-money {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  background: var(--surface);
  padding-left: 12px;
}
.rate-money span {
  color: var(--muted);
  font: 500 13px var(--sans);
}
.rate-money input {
  border: 0;
  outline: none;
  height: 100%;
  width: 100%;
  min-width: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--text);
  font: 500 14px var(--sans);
}
.rate-name {
  align-self: center;
  font: 600 15px var(--sans);
}
.game-block {
  border-top: 1px solid var(--line);
}
.game-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.game-tools h3 {
  margin: 0;
  font: 600 16px var(--sans);
}
.game-tools-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.game-block .rate-line {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
}
.game-block .rate-add {
  border-top: 1px solid var(--line);
}
.rate-caption {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.game-remove,
.rate-remove {
  display: none;
}
@media (max-width: 720px) {
  .rate-line {
    grid-template-columns: 1fr 1fr;
  }
  .rate-name {
    grid-column: 1 / -1;
  }
}
.sheet-bar {
  align-items: center;
  justify-content: space-between;
}
.sheet-add .field {
  margin: 0;
  min-width: 140px;
}
.sheet-add .field-grow {
  flex: 1;
  min-width: 220px;
}
.sheet-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.sheet-note input {
  width: 64px;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 8px 10px;
  font: 600 14px var(--mono);
  color: var(--text);
}
.sheet-link {
  background: none;
  border: 0;
  padding: 0;
  font: 500 13px var(--sans);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.sheet-link:hover {
  color: var(--text);
}
.sheet-editing {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.sheet-bar > .sheet-add {
  flex: 1;
  border: 0;
  padding: 0;
  background: transparent;
}
.sheet .table .search {
  width: 100%;
}
.sheet .price-input {
  max-width: 150px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: none;
}
.check small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.filters .field {
  min-width: 150px;
}

/* Searchable dropdown (assets/js/searchable_select.js) */
.ss {
  position: relative;
  min-width: 200px;
}
.ss-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.ss-button {
  width: 100%;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 11px 32px 11px 12px;
  color: var(--text);
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.ss-button:focus,
.ss-button[aria-expanded="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.ss-panel {
  /* Positioned by JS; above modals (200), below the confirm box (300) */
  position: fixed;
  z-index: 250;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.12);
  padding: 8px;
}
.ss-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid oklch(0.87 0.007 70);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--text);
}
.ss-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.ss-option {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.ss-option.is-active {
  background: var(--surface-2, oklch(0.97 0.005 250));
}
.ss-option.is-selected {
  font-weight: 600;
  color: #800000;
}
.ss-option.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}
.ss-button.is-invalid {
  border-color: var(--st-timeup, #b42318);
}
.ss-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ss-empty {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Compact filter toolbar (bookings list, etc.) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.filter-bar-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex: none;
}
.filter-seg {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.filter-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-seg span {
  display: block;
  padding: 7px 12px;
  border-radius: 7px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  white-space: nowrap;
}
.filter-seg:hover span {
  color: var(--text);
}
.filter-seg input:checked + span,
a.filter-seg span.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
a.filter-seg {
  text-decoration: none;
  color: inherit;
}
.filter-seg input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.filter-bar-split {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex: none;
  align-self: center;
  margin: 0 2px;
}
.filter-bar-field,
.filter-bar-search {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  min-width: 0;
}
.filter-bar-label {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-bar-field select,
.filter-bar-field input[type="date"] {
  min-width: 148px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: 500 13px/1 var(--sans);
}
.filter-bar-field select:hover,
.filter-bar-field input[type="date"]:hover,
.filter-bar-search-wrap:hover {
  border-color: color-mix(in oklab, var(--text) 18%, var(--line));
}
.filter-bar-field select:focus,
.filter-bar-field input[type="date"]:focus,
.filter-bar-search-wrap:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
  background: var(--surface);
}
.filter-bar-search {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 320px;
}
.filter-bar-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.filter-bar-search-wrap i {
  color: var(--muted);
  font-size: 12px;
  flex: none;
}
.filter-bar-search-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  height: 100%;
  font: 500 13px/1 var(--sans);
  color: var(--text);
  outline: none;
}
.filter-bar-search-wrap input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.filter-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-bottom: 1px;
}
.filter-bar-clear {
  font: 600 12px/1 var(--sans);
  color: var(--muted);
  text-decoration: none;
  padding: 8px 2px;
}
.filter-bar-clear:hover {
  color: var(--text);
}
@media (max-width: 900px) {
  .filter-bar-split {
    display: none;
  }
  .filter-bar-actions {
    margin-left: 0;
    width: 100%;
  }
}
.settings-form {
  max-width: 760px;
}
/* Company logo upload on General settings */
.logo-upload {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.logo-upload-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2, oklch(0.97 0.005 250));
  padding: 6px;
}
.logo-upload-body {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.logo-upload-hint {
  font-size: 12px;
}
/* Settings form that stretches to the full content width */
.settings-form.settings-form-fill {
  max-width: none;
  width: 100%;
}
.table .center {
  text-align: center;
}
.table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.table select.js-station-status {
  min-width: 150px;
  max-width: 100%;
  padding: 6px 10px;
  font: inherit;
}
.is-short {
  color: var(--st-timeup);
}
.is-over {
  color: var(--st-paused);
}

@media (max-width: 1100px) {
  .floor {
    grid-template-columns: 1fr;
  }
  .floor > .panel {
    position: static;
  }
}
/* Print popup: receipt only */
body:has(.is-autoprint) .topbar,
body:has(.is-autoprint) .sidebar,
body:has(.is-autoprint) .page-head,
body:has(.is-autoprint) .no-print {
  display: none !important;
}
body:has(.is-autoprint) .shell {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}
body:has(.is-autoprint) .main {
  padding: 24px;
}
body:has(.is-autoprint) .booking-receipt-layout {
  max-width: 420px;
  margin: 0 auto;
}

@media print {
  body:has(.shell) {
    height: auto !important;
    overflow: visible !important;
  }
  .topbar,
  .sidebar,
  .station-grid,
  #toast,
  .no-print {
    display: none !important;
  }
  .shell,
  .floor,
  .booking-receipt-layout,
  .main {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .booking-receipt-layout {
    max-width: none;
  }
  .receipt,
  .kiosk-ticket {
    box-shadow: none;
  }
}

/* ---------- Booking desk ---------- */
.booking-desk {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  width: 100%;
  max-width: none;
}
.booking-card {
  width: 100%;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.03);
}
.booking-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, oklch(0.985 0.004 70), var(--surface));
}
.booking-card-head h2 {
  margin: 0;
  font: 700 18px/1.25 var(--sans);
  letter-spacing: -0.02em;
  color: var(--text);
}
.booking-card-head p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.booking-total {
  flex: none;
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 10px;
  background: oklch(0.22 0.01 60);
  color: #fff;
  text-align: right;
}
.booking-total-label {
  display: block;
  font: 650 10px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}
.booking-total strong {
  display: block;
  margin-top: 4px;
  font: 700 22px/1 var(--mono);
  letter-spacing: -0.03em;
}
.booking-total [data-booking-summary-game] {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.82;
}
.booking-card-body {
  padding: 18px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.booking-heading {
  margin: 0 0 10px;
  font: 700 13px/1.2 var(--sans);
  color: var(--text);
  letter-spacing: -0.01em;
}
.booking-block .game-pick {
  width: 100%;
  min-height: 72px;
}
.booking-block .game-pick-copy strong {
  font-size: 15px;
}
.booking-block .game-pick-copy span {
  font-size: 13px;
}
.booking-rates {
  margin-top: 14px;
}
.booking-rates[hidden] {
  display: none;
}
.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.booking-split {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.booking-split[hidden] {
  display: none;
}
.booking-split .rate-money {
  height: 46px;
}
.booking-card .booking-split .rate-money input {
  border: 0;
  padding: 0 12px;
  background: transparent;
  font-size: 15px;
}
.booking-card .field {
  min-width: 0;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
}
.booking-card .field-label {
  font: 650 13px/1.2 var(--sans);
  color: var(--text);
}
.booking-card .field-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.booking-card .field input,
.booking-card .field select,
.booking-card .field textarea {
  width: 100%;
  min-width: 0;
  font-size: 15px;
  padding: 12px 13px;
  border-color: oklch(0.84 0.008 70);
  background: #fff;
}
.booking-card .field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.4;
}
.booking-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.booking-hint a {
  color: var(--text);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.booking-card-foot {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.booking-card-foot .btn-lg {
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
}
.booking-upcoming-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.03);
}
.booking-upcoming-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.booking-upcoming-head h2 {
  margin: 0;
  font: 700 16px/1.2 var(--sans);
  color: var(--text);
}
.booking-upcoming-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.booking-empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
}
.booking-empty i {
  font-size: 22px;
  opacity: 0.55;
}
.booking-empty p {
  margin: 10px 0 4px;
  font: 650 14px/1.3 var(--sans);
  color: var(--text);
}
.booking-empty span {
  font-size: 12px;
  line-height: 1.4;
}
/* Full-page reservation / booking cards (same tile as booking upcoming) */
.reservations-grid {
  --booking-tile-h: 168px;
  --booking-tile-gap: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: var(--booking-tile-h);
  align-content: start;
  gap: var(--booking-tile-gap);
  width: 100%;
}
.reservations-grid.is-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.reservations-empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 48px 18px;
}
.booking-row.is-busy {
  opacity: 0.85;
  background: var(--surface-2);
}
.booking-row.is-cancelled {
  opacity: 0.92;
}
.booking-row-status {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b42318;
  background: rgba(180, 35, 24, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  flex-shrink: 0;
}

/* Financial management */
.finance-form { max-width: 920px; }
.finance-form-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 0;
}
.finance-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
}
.finance-panel,
.finance-panel.is-wide {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
}
.finance-panel .booking-card-body {
  flex: 1;
}
.finance-lines { margin-top: 18px; }
.finance-supplier-table { margin-top: 18px; }
.finance-supplier-table .booking-heading { margin: 0 0 10px; }
.finance-supplier-table .table-card { max-height: 280px; overflow: auto; }
.finance-supplier-table .table th,
.finance-supplier-table .table td { padding: 10px 12px; }
.finance-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.finance-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.finance-panel .finance-line .field,
.finance-line .field {
  min-width: 0;
}
.finance-panel .finance-line .btn,
.finance-line .btn {
  justify-self: start;
}
.finance-audit { margin-top: 28px; }
.finance-status.is-draft,
.booking-row-status.is-draft { color: var(--muted); background: rgba(0,0,0,0.06); }
.finance-status.is-submitted,
.booking-row-status.is-submitted { color: #9a6700; background: rgba(154, 103, 0, 0.12); }
.finance-status.is-approved,
.booking-row-status.is-approved { color: oklch(0.35 0.12 145); background: oklch(0.96 0.03 145); }
.finance-status.is-received,
.booking-row-status.is-received { color: var(--muted); background: var(--surface-2); }
.finance-status.is-declined,
.booking-row-status.is-declined { color: #b42318; background: rgba(180, 35, 24, 0.1); }
.booking-row-status.is-urgent,
.finance-row.is-urgent .booking-row-guest { color: #b42318; }
.booking-row-status.is-urgent {
  color: #b42318;
  background: rgba(180, 35, 24, 0.1);
}
.booking-row-status.is-confirmed { color: oklch(0.35 0.12 145); background: oklch(0.96 0.03 145); }
.booking-row-status.is-checked_in { color: #175cd3; background: rgba(23, 92, 211, 0.1); }
.booking-row-status.is-completed { color: #027a48; background: rgba(2, 122, 72, 0.1); }
.booking-row-status.is-cancelled { color: #b42318; background: rgba(180, 35, 24, 0.1); }
.booking-row-status.is-no_show { color: var(--muted); background: rgba(0,0,0,0.06); }
.booking-row-amt small {
  display: block;
  font: 600 9px/1 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
  text-align: right;
}
.booking-row-meta .booking-row-status {
  justify-self: start;
  margin-top: 2px;
  width: fit-content;
}
@media (max-width: 1100px) {
  .finance-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .finance-form-layout .booking-grid,
  .finance-line {
    grid-template-columns: 1fr;
  }
}
.booking-act-checkin {
  color: oklch(0.38 0.12 145);
}
.booking-act-checkin:hover {
  background: oklch(0.96 0.03 145);
  color: oklch(0.32 0.13 145);
}
.booking-act-muted {
  color: var(--muted);
  cursor: default;
}
.booking-act-muted:hover {
  background: transparent;
}
@media (max-width: 1280px) {
  .reservations-grid,
  .reservations-grid.is-cols-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .reservations-grid,
  .reservations-grid.is-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .reservations-grid,
  .reservations-grid.is-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* 3-column grid fills the side panel; height capped to the form; Y-scroll for the rest */
.booking-upcoming {
  --booking-tile-h: 168px;
  --booking-tile-gap: 10px;
  --booking-pad: 12px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--booking-tile-h);
  align-content: start;
  gap: var(--booking-tile-gap);
  padding: var(--booking-pad);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.booking-upcoming-panel .booking-empty {
  flex: 1 1 auto;
  display: grid;
  place-content: center;
}
.booking-row {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.booking-row:hover {
  border-color: oklch(0.78 0.015 70);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.04);
}
.booking-row-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 10px 0;
}
.booking-row-cover {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  flex: none;
}
.booking-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.booking-row-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}
.booking-row-guest {
  font: 700 13px/1.25 var(--sans);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-row-phone {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text);
  opacity: 0.78;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-row-game {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-row-amt {
  font: 700 12px/1.2 var(--mono);
  color: var(--text);
  white-space: nowrap;
  padding-top: 2px;
}
.booking-row-when {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px 10px;
  min-width: 0;
}
.booking-row-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-row-time i {
  font-size: 10px;
  opacity: 0.75;
}
.booking-row-code {
  flex: none;
  font: 650 10px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
}
.booking-pay {
  flex: none;
  font: 650 10px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 7px;
  border: 1px solid var(--line);
}
.booking-pay.is-pending {
  color: oklch(0.45 0.12 55);
  background: oklch(0.96 0.04 75);
  border-color: oklch(0.88 0.06 70);
}
.booking-pay.is-paid {
  color: oklch(0.38 0.1 145);
  background: oklch(0.96 0.03 145);
  border-color: oklch(0.88 0.05 145);
}
.booking-row-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: oklch(0.985 0.003 70);
}
.booking-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 650 11px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.booking-act:last-child {
  border-right: 0;
}
.booking-act i {
  font-size: 10px;
  opacity: 0.8;
}
.finance-row .booking-row-actions {
  display: flex;
  justify-content: space-between;
}
.finance-row .booking-act {
  flex: 1 1 0;
}
.finance-row .booking-act i {
  font-size: 13px;
  opacity: 1;
}

.pr-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: rgba(22, 18, 16, 0.46);
}
.pr-modal.is-open {
  display: flex;
}
.pr-modal-card {
  width: min(760px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(22, 18, 16, 0.28);
}
.pr-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.pr-modal-kicker {
  margin: 0 0 4px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pr-modal-head h2 {
  margin: 0;
  font: 700 22px/1.2 var(--sans);
  letter-spacing: -0.02em;
}
.pr-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pr-modal-amount {
  text-align: right;
  padding-top: 2px;
}
.pr-modal-amount span {
  display: block;
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pr-modal-amount strong {
  display: block;
  margin-top: 6px;
  font: 700 20px/1 var(--mono);
}
.pr-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.pr-modal-close:hover {
  color: var(--text);
  border-color: var(--text);
}
.pr-modal-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.pr-modal-facts div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
}
.pr-modal-facts span {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pr-modal-facts strong {
  font: 600 14px/1.3 var(--sans);
}
.pr-modal-note {
  margin: 0;
  padding: 12px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.pr-modal-table-wrap {
  padding: 8px 8px 12px;
}
.pr-modal-table th,
.pr-modal-table td {
  font-size: 13px;
}
@media (max-width: 720px) {
  .pr-modal-head,
  .pr-modal-facts {
    grid-template-columns: 1fr 1fr;
  }
  .pr-modal-close {
    justify-self: end;
  }
}
.booking-act:hover {
  background: #fff;
  color: var(--text);
}
.booking-act-danger {
  color: oklch(0.42 0.13 25);
}
.booking-act-danger:hover {
  background: oklch(0.97 0.02 25);
  color: oklch(0.38 0.15 25);
}
@container (max-width: 190px) {
  .booking-act span {
    display: none;
  }
  .booking-act {
    gap: 0;
  }
  .booking-act i {
    font-size: 12px;
    opacity: 1;
  }
}
@media (max-width: 1100px) {
  .booking-desk {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .booking-card:not(.is-wide):not(.finance-panel) {
    width: 100%;
    max-width: 560px;
  }
  .booking-upcoming-panel {
    position: static;
    width: 100%;
    max-width: 560px;
    max-height: min(520px, 70vh);
  }
  .booking-upcoming {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .booking-upcoming {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .booking-grid,
  .booking-split {
    grid-template-columns: 1fr;
  }
  .booking-card-head,
  .booking-card-body,
  .booking-card-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
  .booking-card-head {
    flex-direction: column;
    gap: 12px;
  }
  .booking-total {
    width: 100%;
    text-align: left;
  }
  .booking-upcoming {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
  }
  .sidebar {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 240px;
    height: auto;
    max-height: none;
    background: var(--bar);
    z-index: 30;
    box-shadow: 0 10px 30px oklch(0 0 0 / 0.12);
    overflow-y: auto;
  }
  .sidebar.open {
    display: flex;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .brand-sub {
    display: none;
  }
  .main {
    padding: 26px 16px 24px;
    height: 100%;
    overflow-y: auto;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-panel {
    display: none;
  }
}

.tile {
  color: var(--text);
  text-decoration: none;
}
.tile:hover {
  background-color: var(--surface-2);
  color: var(--text);
}
.tile.has-game:hover {
  background-color: #2a221c;
  color: #fff;
}

/* ---------- Self check-in kiosk ---------- */
.kiosk-body {
  background: oklch(0.94 0.005 70);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 16px;
  position: relative;
}
.kiosk-body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  /* --brand-logo is set on <body> to the uploaded logo; falls back to the built-in one */
  background-image: var(--brand-logo, url("../images/rctech-logo.png"));
  background-repeat: repeat;
  background-size: 140px auto;
  background-position: center;
  transform: rotate(-18deg);
}
.kiosk {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  min-height: min(640px, calc(100vh - 40px));
  margin-block: auto;
  background: var(--bar);
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kiosk.is-wide {
  max-width: 860px;
}
.kiosk form {
  margin: 0;
}
.kiosk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.kiosk-logo {
  /* Negative margins trim the PNG's transparent padding */
  height: 90px;
  width: 90px;
  margin: -9px -4px -16px -14px;
}
.kiosk-top .brand-name {
  margin-right: auto;
  font-size: 22px;
}
.kiosk-back {
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
  border-radius: 12px;
}
.kiosk-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 0;
}
.kiosk-hero h1 {
  font: 800 44px var(--sans);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
.kiosk-hero p {
  font-size: 18px;
  color: oklch(0.42 0.012 60);
  line-height: 1.4;
  margin: 0;
}
.kiosk-ok {
  font: 600 16px var(--mono);
  color: var(--st-active);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kiosk-code-label {
  margin: 10px 0 0;
  font: 600 14px/1.2 var(--sans);
  color: oklch(0.48 0.012 60);
}
.kiosk-code {
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.kiosk-ticket {
  background: oklch(0.22 0.01 50);
  color: oklch(0.97 0.004 70);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 40px oklch(0.22 0.01 50 / 0.18);
}
.kiosk-ticket-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kiosk-ticket-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.kiosk-ticket-brand strong {
  display: block;
  font: 800 18px/1.2 var(--sans);
}
.kiosk-ticket-brand span {
  display: block;
  margin-top: 2px;
  font: 500 13px/1.3 var(--sans);
  color: oklch(0.75 0.01 60);
}
.kiosk-ticket-code {
  text-align: center;
  padding: 14px 10px;
  border-radius: 14px;
  background: oklch(0.28 0.012 50);
  border: 1px dashed oklch(0.45 0.01 60);
}
.kiosk-ticket-code span {
  display: block;
  font: 650 12px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.72 0.01 60);
}
.kiosk-ticket-code strong {
  display: block;
  margin-top: 8px;
  font: 800 40px/1 var(--mono);
  letter-spacing: 0.14em;
}
.kiosk-ticket-pay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: oklch(0.28 0.012 50);
}
.kiosk-ticket-pay span {
  font: 500 14px/1.2 var(--sans);
  color: oklch(0.75 0.01 60);
}
.kiosk-ticket-pay strong {
  font: 800 15px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kiosk-ticket-pay.is-pending strong {
  color: oklch(0.82 0.14 75);
}
.kiosk-ticket-pay.is-paid strong {
  color: oklch(0.78 0.14 145);
}
.kiosk-ticket-lines {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kiosk-ticket-lines div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
}
.kiosk-ticket-lines dt {
  color: oklch(0.72 0.01 60);
}
.kiosk-ticket-lines dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.kiosk-ticket-lines .is-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed oklch(0.45 0.01 60);
  font-size: 18px;
}
.kiosk-ticket-note {
  margin: 0;
  font: 500 13px/1.4 var(--sans);
  color: oklch(0.72 0.01 60);
}
.kiosk-ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media print {
  body.kiosk-body {
    background: #fff;
    padding: 0;
  }
  body.kiosk-body::before {
    display: none;
  }
  .kiosk {
    border: 0;
    box-shadow: none;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .kiosk-top,
  .page-head,
  .kiosk-ticket-actions,
  .kiosk-back {
    display: none !important;
  }
  .kiosk-ticket {
    box-shadow: none;
    border-radius: 0;
  }
}
.kiosk-title {
  font: 800 34px var(--sans);
  letter-spacing: -0.02em;
  margin: 0;
}
.kiosk-sub {
  font-size: 17px;
  color: oklch(0.47 0.012 60);
  margin: 6px 0 0;
}
.kiosk-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kiosk-grow {
  flex: 1;
  display: flex;
}
.kiosk-btn {
  width: 100%;
  min-height: 76px;
  border-radius: 18px;
  font: 800 20px var(--sans);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
}
.kiosk-btn small {
  font: 500 14px var(--sans);
}
.kiosk-primary {
  background: var(--accent);
  color: var(--ink);
  border: none;
}
.kiosk-primary:hover {
  background: var(--text);
  color: var(--ink);
}
.kiosk-dark {
  background: var(--text);
  color: var(--ink);
  border: none;
}
.kiosk-dark:hover {
  background: var(--accent);
  color: var(--ink);
}
.kiosk-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid oklch(0.84 0.007 70);
}
.kiosk-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.kiosk-phone {
  width: 100%;
  display: flex;
  align-items: center;
  background: oklch(0.96 0.005 70);
  border: 1px solid oklch(0.86 0.007 70);
  border-radius: 16px;
  min-height: 76px;
  padding: 0 22px;
  font: 600 30px var(--mono);
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}
.kiosk-phone.is-empty {
  color: oklch(0.72 0.01 60);
}
.keypad {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.key {
  background: oklch(0.945 0.006 70);
  color: var(--text);
  border: none;
  border-radius: 14px;
  font: 600 26px var(--mono);
  cursor: pointer;
  min-height: 60px;
}
.key:hover {
  color: var(--accent);
}
.key:active {
  background: oklch(0.87 0.007 70);
}
.kiosk-choice {
  flex: 1;
  width: 100%;
  min-height: 88px;
  background: oklch(0.945 0.006 70);
  color: var(--text);
  border: 1px solid oklch(0.86 0.007 70);
  border-radius: 18px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font: 800 28px var(--sans);
}
.kiosk-choice .mono {
  font: 600 26px var(--mono);
}
.kiosk-choice:hover {
  border-color: var(--accent);
}
/* Game and screen steps: the card is capped to the screen so the list scrolls inside it */
.kiosk.is-games,
.kiosk.is-screens {
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  min-height: 420px;
}
/* Screen step only; the time-block step (.is-blocks) keeps its normal layout */
.kiosk.is-screens .kiosk-stations {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 4px 6px 8px 4px;
  margin: 0 -6px 0 -4px;
}
.kiosk.is-screens .kiosk-stations form {
  height: auto;
  display: flex;
}
.kiosk.is-screens .kiosk-station.has-screen {
  height: 100%;
  gap: 12px;
}
.kiosk.is-screens .kiosk-station-copy {
  flex: 1 1 auto;
}
.kiosk-game-grid {
  flex: 1 1 auto;
  /* min-height: 0 lets the grid shrink below its content so overflow can scroll */
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 4px 6px 8px 4px;
  margin: 0 -6px 0 -4px;
}
.kiosk-game-grid form {
  margin: 0;
  min-width: 0;
  width: 100%;
  display: flex;
}
.kiosk-game-tile {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  border-radius: 16px;
}
.kiosk-game-tile:hover .kiosk-game-cover,
.kiosk-game-tile:focus-visible .kiosk-game-cover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px oklch(0.35 0.04 40 / 0.14);
  transform: translateY(-2px);
}
.kiosk-game-tile:focus-visible {
  outline: none;
}
.kiosk-game-cover {
  position: relative;
  width: 100%;
  /* Scales with the column width instead of a fixed 200px, so phones keep the same shape */
  aspect-ratio: 5 / 4;
  flex: none;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid oklch(0.86 0.007 70);
  background:
    linear-gradient(160deg, oklch(0.96 0.01 70), oklch(0.9 0.02 55));
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(0.55 0.02 60);
  font-size: 28px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.kiosk-game-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.kiosk-game-cover.is-banner {
  width: 72px;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  font-size: 22px;
  flex: none;
}
.kiosk-game-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 2px 4px;
  min-width: 0;
  height: 32px;
  flex: none;
}
.kiosk-game-meta strong {
  font: 700 15px/1.25 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kiosk-game-meta small {
  font: 600 13px/1.2 var(--mono);
  color: oklch(0.45 0.012 60);
}
.kiosk-game-cover.is-modal {
  width: 120px;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  font-size: 28px;
  flex: none;
}
body.kiosk-modal-open {
  overflow: hidden;
}
.kiosk-rate-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: oklch(0.2 0.01 50 / 0.5);
}
.kiosk-rate-modal[hidden] {
  display: none !important;
}
.kiosk-rate-modal.is-open {
  display: flex !important;
}
.kiosk-rate-card {
  position: relative;
  width: min(520px, 100%);
  background: var(--bar);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 28px 70px oklch(0.22 0.01 50 / 0.28);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.kiosk-rate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid oklch(0.88 0.007 70);
  border-radius: 12px;
  background: oklch(0.97 0.004 70);
  color: var(--text);
  font: 500 24px/1 var(--sans);
  cursor: pointer;
}
.kiosk-rate-close:hover {
  border-color: var(--accent);
}
.kiosk-rate-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-right: 36px;
}
.kiosk-rate-eyebrow {
  margin: 0 0 4px;
  font: 600 12px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.5 0.02 55);
}
.kiosk-rate-copy h2 {
  margin: 0;
  font: 800 28px/1.15 var(--sans);
  letter-spacing: -0.02em;
}
.kiosk-rate-sub {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: oklch(0.45 0.012 60);
}
.kiosk-rate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kiosk-rate-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kiosk-rate-option {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid oklch(0.86 0.007 70);
  background: oklch(0.96 0.005 70);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.kiosk-rate-option:hover {
  border-color: oklch(0.7 0.03 50);
}
.kiosk-rate-option.is-selected {
  border-color: var(--accent);
  background: oklch(0.98 0.01 70);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.kiosk-rate-option-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.kiosk-rate-option-main b {
  font: 800 22px/1.15 var(--sans);
  letter-spacing: -0.02em;
}
.kiosk-rate-option-main small {
  font: 500 13px/1.2 var(--sans);
  color: oklch(0.5 0.012 60);
}
.kiosk-rate-option-price {
  font: 700 22px/1 var(--mono);
  white-space: nowrap;
}
.kiosk-rate-form .kiosk-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 720px) {
  .kiosk.is-wide {
    max-width: 620px;
  }
  .kiosk-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kiosk-game-meta strong {
    font-size: 14px;
  }
  .kiosk-rate-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .kiosk-game-cover.is-modal {
    width: 96px;
  }
}
.kiosk .page-head {
  align-items: flex-start;
  margin-bottom: 12px;
}
.kiosk-screen-note {
  margin: -4px 0 2px;
  font: 500 13px/1.45 var(--sans);
  color: var(--muted);
}
.kiosk .legend {
  margin: 0;
  justify-content: flex-end;
  max-width: min(100%, 520px);
}
.kiosk-stations {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.kiosk-stations form {
  margin: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
}
.kiosk-station {
  width: 100%;
  height: 88px;
  min-height: 88px;
  max-height: 88px;
  box-sizing: border-box;
  background: oklch(0.945 0.006 70);
  color: var(--text);
  border: 1px solid oklch(0.85 0.007 70);
  border-radius: 14px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.kiosk-station b {
  font: 800 19px var(--sans);
}
.kiosk-station .mono {
  font: 700 16px var(--mono);
}
.kiosk-station-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.kiosk-station-copy small {
  font: 500 12px/1.2 var(--sans);
  color: oklch(0.5 0.012 60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.kiosk-station.has-screen {
  height: auto;
  min-height: 108px;
  max-height: none;
  padding: 12px 16px;
  align-items: flex-start;
  box-shadow: inset 5px 0 0 var(--tile-color, var(--st-free));
}
.kiosk-station.has-screen.is-active {
  background: color-mix(in oklch, var(--st-active) 9%, oklch(0.945 0.006 70));
}
.kiosk-station.has-screen.is-warning {
  background: color-mix(in oklch, var(--st-warning) 11%, oklch(0.945 0.006 70));
}
.kiosk-station.has-screen.is-timeup {
  background: color-mix(in oklch, var(--st-timeup) 10%, oklch(0.945 0.006 70));
}
.kiosk-station.has-screen.is-paused {
  background: color-mix(in oklch, var(--st-paused) 10%, oklch(0.945 0.006 70));
}
.kiosk-station.has-screen.is-offline {
  background: color-mix(in oklch, var(--st-offline) 8%, oklch(0.945 0.006 70));
}
.kiosk-station .kiosk-station-hint {
  display: block;
  margin-top: 4px;
  font: 500 12px/1.35 var(--sans);
  color: oklch(0.42 0.012 60);
  white-space: normal;
}
.kiosk-station .kiosk-station-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
  text-align: right;
  font: 650 13px/1.2 var(--sans);
  color: var(--tile-color, var(--muted));
}
.kiosk-station-status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kiosk-station-status em {
  font: 700 18px/1 var(--mono);
  font-style: normal;
  color: var(--text);
}
.kiosk-station.has-screen:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--tile-color, var(--accent));
}
.kiosk-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 28px 22px;
  border-radius: 18px;
  background: oklch(0.96 0.005 70);
  border: 1px solid oklch(0.88 0.007 70);
}
.kiosk-empty strong {
  font: 800 22px/1.2 var(--sans);
}
.kiosk-empty p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: oklch(0.45 0.012 60);
}
.kiosk-station:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.kiosk-station:disabled {
  background: transparent;
  color: oklch(0.75 0.01 60);
  border-color: oklch(0.91 0.006 70);
  cursor: default;
}
.kiosk-summary {
  background: oklch(0.96 0.005 70);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 17px;
  margin: 0;
}
.kiosk-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.kiosk-summary dt {
  color: oklch(0.47 0.012 60);
}
.kiosk-summary dd {
  margin: 0;
  font-weight: 700;
}
.confirm-overlay {
  position: fixed;
  inset: 0;
  /* Above .game-modal (200) so confirms work inside modals */
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: oklch(0.22 0.01 50 / 0.45);
}
.confirm-overlay[hidden] {
  display: none;
}
.confirm-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 50px oklch(0.22 0.01 50 / 0.18);
  text-align: center;
}
.confirm-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.96 0.02 25);
  color: oklch(0.5 0.18 25);
  font-size: 16px;
}
.confirm-title {
  margin: 0;
  font: 700 18px/1.3 var(--sans);
  letter-spacing: -0.02em;
}
.confirm-detail {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.confirm-actions .btn {
  min-width: 96px;
  padding: 9px 14px;
}
.confirm-delete {
  background: var(--accent);
  color: white;
  border: 0;
  font-weight: 600;
  cursor: pointer;
}
.confirm-delete:hover {
  background: oklch(0.46 0.2 25);
  color: white;
}
@media (max-width: 520px) {
  .kiosk {
    min-height: min(480px, calc(100vh - 40px));
    padding: 22px 18px;
    gap: 14px;
    border-radius: 20px;
  }
  .kiosk-btn {
    min-height: 66px;
  }
  .kiosk-phone {
    min-height: 66px;
    font-size: 28px;
  }
  .key {
    min-height: 56px;
  }
  .kiosk-hero h1 {
    font-size: 40px;
  }
  .kiosk-title {
    font-size: 28px;
  }
  .kiosk-choice {
    font-size: 22px;
  }
  .kiosk-stations {
    grid-template-columns: 1fr;
  }
  .kiosk-stations.is-blocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Phones: smaller screen tiles and a compact status legend */
  .kiosk.is-screens .kiosk-station.has-screen {
    min-height: 92px;
    padding: 10px 12px;
  }
  .kiosk.is-screens .kiosk-station b {
    font-size: 17px;
  }
  .kiosk.is-screens .kiosk-station-status em {
    font-size: 16px;
  }
  .kiosk.is-screens .page-head .legend {
    font-size: 11px;
    gap: 6px 10px;
  }
}

/* Per-user module permissions */
.perm-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2, oklch(0.97 0.005 250));
}
.perm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg, #fff);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.perm-toolbar-left,
.perm-toolbar-actions,
.perm-actions,
.perm-saved-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.perm-module {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg, #fff);
}
.perm-module.is-hidden,
.perm-children.is-hidden,
.is-hidden {
  display: none !important;
}
.perm-module-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.perm-module-label {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.perm-module-label small {
  display: block;
}
.perm-toggle i {
  transition: transform 0.15s ease;
}
.perm-toggle i.is-open {
  transform: rotate(180deg);
}
.perm-children {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2, oklch(0.97 0.005 250));
}
.perm-children .check {
  margin: 0;
}
.perm-saved-list {
  display: grid;
  gap: 12px;
}
.perm-saved {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.perm-saved-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.perm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.perm-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2, oklch(0.97 0.005 250));
  font-size: 12px;
}
body.perm-read-only .btn-solid[type="submit"],
body.perm-read-only button.btn-danger,
body.perm-read-only .inline-form .btn-danger {
  display: none !important;
}
@media (max-width: 640px) {
  .perm-children {
    grid-template-columns: 1fr;
  }
}

/* Full-screen wait overlay: spinning ring around the brand logo. */
.page-wait {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  background: rgba(8, 10, 14, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page-wait.is-on {
  display: grid;
}
.page-wait-card {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.page-wait-card img {
  width: 56px;
  height: auto;
}
.page-wait-card span {
  position: absolute;
  bottom: -28px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.page-wait-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid oklch(0.92 0.01 27);
  border-top-color: var(--accent);
  animation: page-wait-spin 0.75s linear infinite;
}
@keyframes page-wait-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Staff wages: run form, employee pay rows, totals, tabs and details */
.payroll-form .booking-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.payroll-head-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.payroll-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.payroll-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.payroll-line {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
  min-width: 0;
}
.payroll-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}
.payroll-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 12px;
}
.payroll-line-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.payroll-line-money fieldset {
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.payroll-line-money legend {
  padding: 0 4px;
  font: 600 12px var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.payroll-money-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.payroll-line-sum {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.payroll-line-sum b {
  color: var(--text);
}
.payroll-line-sum .is-net b {
  color: var(--st-active);
  font-size: 15px;
}
.payroll-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.payroll-totals > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}
.payroll-totals strong {
  font-size: 20px;
  color: var(--text);
}
.payroll-totals .is-net {
  border-color: color-mix(in oklch, var(--st-active) 45%, var(--line));
  background: color-mix(in oklch, var(--st-active) 7%, var(--surface));
}
.payroll-totals .is-net strong {
  color: var(--st-active);
}
.payroll-totals.is-compact {
  margin-bottom: 14px;
}
.payroll-totals.is-compact strong {
  font-size: 17px;
}
.payroll-decline-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklch, var(--st-timeup) 35%, var(--line));
  background: color-mix(in oklch, var(--st-timeup) 7%, var(--surface));
  color: var(--st-timeup);
  font-size: 14px;
}
.payroll-decline-note[hidden] {
  display: none;
}
.payroll-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.payroll-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.payroll-tabs a span {
  font: 600 11px var(--mono);
  color: var(--muted);
}
.payroll-tabs a.is-current {
  background: var(--text);
  border-color: var(--text);
  color: var(--ink);
}
.payroll-tabs a.is-current span {
  color: var(--ink);
}
.payroll-modal-card {
  width: min(960px, 100%);
}
.payroll-detail-table td {
  vertical-align: top;
}
.payroll-timeline {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.payroll-decline-card {
  width: min(520px, 100%);
}
@media (max-width: 720px) {
  .payroll-line-money,
  .payroll-totals {
    grid-template-columns: minmax(0, 1fr);
  }
}
.payroll-line-head .btn-sm {
  padding: 5px 10px;
  font-size: 13px;
}

/* Cash flow filters and panels */
.cashflow-filters {
  margin: 0 0 16px;
  align-items: flex-end;
}
.cashflow-filters [data-cf-custom][hidden] {
  display: none;
}

/* Dashboard period filter and screen filter chips */
.dash-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dash-filters [data-cf-custom][hidden] {
  display: none;
}
.dash-filters .pill {
  cursor: pointer;
}
.dash-filters input.pill {
  font: 600 12px var(--sans);
  color: var(--text);
  padding: 3px 10px;
}
.dash-period select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding-right: 14px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 5px center, right 1px center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.dash-period select:focus {
  outline: none;
}
.dash-period:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.dash-screen-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dash-screen-filter .pill {
  text-decoration: none;
  cursor: pointer;
}
.dash-screen-filter .pill b {
  font-weight: 700;
  opacity: 0.8;
}
.dash-screen-filter .pill.is-selected {
  background: var(--pill, var(--text));
  border-color: var(--pill, var(--text));
  color: var(--surface);
}
.kpi-card.is-dim {
  opacity: 0.55;
}
.progress.is-in i {
  background: var(--st-active);
}
.cashflow-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cashflow-methods b {
  margin-left: 4px;
}

/* KPI grid fixed at three cards per row (Sales sheet) */
.kpi-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .kpi-grid.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .kpi-grid.is-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Account difference: date / cash / MoMo on one row + split preview */
.difference-entry-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.difference-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.difference-preview-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}
.difference-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.difference-preview-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.difference-preview-grid b {
  font-size: 15px;
  color: var(--text);
}
.difference-preview-grid b.is-short {
  color: var(--st-timeup);
}
.difference-preview-grid b.is-over {
  color: var(--st-paused);
}
.difference-preview-grid .is-total b {
  font-size: 17px;
}
.difference-closer-field {
  min-width: 180px;
}
@media (max-width: 760px) {
  .difference-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .difference-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Configuration settings: payments left, Hubtel SMS right */
.settings-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.settings-split > .settings-form,
.settings-split > .stack > .settings-form {
  max-width: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.settings-split [hidden] {
  display: none !important;
}
.sms-head,
.sms-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sms-log-head {
  font-size: 13px;
}
.sms-sender {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 14px;
}
.sms-sender a {
  margin-left: auto;
  font-size: 13px;
}
.sms-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.sms-templates summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.sms-templates .field + .field {
  margin-top: 10px;
}
.sms-test-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.sms-test-row .field {
  flex: 1;
}
.sms-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
/* Test SMS card: fixed height, recent log scrolls inside */
.sms-test-card {
  height: 420px;
}
.sms-test-card .sms-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.sms-log li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.sms-log li small {
  flex-basis: 100%;
}
@media (max-width: 960px) {
  .settings-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Notification settings: SMS and customer email side by side, staff email below */
.notify-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.notify-split > section + section {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.notify-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notify-note {
  margin: 0;
  font-size: 13px;
}
.notify-staff {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.notify-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}
@media (max-width: 860px) {
  .notify-split,
  .notify-staff-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .notify-split > section + section {
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Kiosk: optional email under the phone keypad */
.kiosk-email {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 4px 0 2px;
  font: 600 14px var(--sans);
  color: var(--text);
}
.kiosk-email small {
  font-weight: 500;
  color: var(--muted);
}
.kiosk-email input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 500 18px var(--sans);
}
.kiosk-email input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* Shown when a TV browser blocks the timer beep until a remote press */
.sound-unlock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  padding: 12px 18px;
  font-size: 16px;
  box-shadow: 0 6px 20px oklch(0 0 0 / 0.25);
}
.sound-unlock:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
