:root {
  --bg: #e9ecef;
  --surface: #ffffff;
  --surface-2: #f4f5f6;
  --ink: #202124;
  --muted: #6a7178;
  --line: #d8dce0;
  --accent: #3f7d20;
  --accent-2: #3f7d20;
  --divider: #cfd5db;
  --danger: #9f2f24;
  --warning: #aa6400;
  --cash: #005d3f;
  --floor: #5d3b00;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  --operator-console-height: 220px;
}

.installation-scope-lock {
  margin: 16px 24px 0;
  padding: 14px 16px;
  border: 2px solid #b42318;
  border-radius: 12px;
  background: #fff1f0;
  color: #7a271a;
}

.installation-scope-lock strong,
.installation-scope-lock p {
  display: block;
  margin: 0;
}

.installation-scope-lock p {
  margin-top: 4px;
}

.installation-scope-lock-recovery {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border-top: 1px solid rgba(180, 35, 24, .28);
  padding-top: 12px;
}

.installation-scope-lock-recovery[hidden] {
  display: none;
}

.installation-scope-lock-recovery p {
  max-width: 760px;
}

.installation-scope-lock-recovery a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .installation-scope-lock {
    margin: 10px 12px 0;
  }

  .installation-scope-lock-recovery {
    align-items: stretch;
    flex-direction: column;
  }

  .installation-scope-lock-recovery a {
    width: 100%;
    white-space: normal;
  }
}

/* Authentication and security settings prototype.
   DEMO ONLY: Visual behavior is production-shaped, verification is still local. */
.demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #d49b36;
  border-radius: 999px;
  background: #fff5dc;
  color: #7d4c00;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  white-space: nowrap;
}

.demo-badge.sync-device-status-ready {
  border-color: #78b68f;
  background: #ecfdf3;
  color: #027a48;
}

.menu-session-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  padding: 10px;
}

.menu-session-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.menu-session-card > strong {
  font-size: 16px;
}

.menu-session-card > small {
  color: var(--muted);
  line-height: 1.35;
}

.menu-session-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.menu-session-actions button {
  min-height: 38px;
}

.security-settings {
  height: 100%;
  overflow: auto;
  padding: 66px 14px 14px;
}

.security-settings-head {
  position: sticky;
  z-index: 34;
  top: 58px;
  gap: 12px;
  background: var(--bg);
}

.security-warning-card {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  border: 1px solid #e2bd68;
  border-left: 5px solid #d49b36;
  border-radius: 3px;
  background: #fff9e9;
  padding: 12px 14px;
}

.security-warning-card p,
.security-card-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.security-settings-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(300px, .9fr);
  gap: 12px;
  align-items: start;
}

.operating-settings-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(300px, .9fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.connectivity-settings-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
}

.promptpay-settings-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
}

.promptpay-settings-card > small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.promptpay-settings-card .primary-button {
  width: fit-content;
  min-width: 260px;
  justify-self: start;
}

.connectivity-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.connectivity-settings-heading > div {
  display: grid;
  gap: 4px;
}

.connectivity-settings-heading h3,
.connectivity-settings-heading p,
.connectivity-simulation-note {
  margin: 0;
}

.connectivity-simulation-note {
  border-left: 5px solid #8fb8d8;
  background: #f4f9fc;
  padding: 10px 12px;
  color: var(--muted);
  line-height: 1.45;
}

.connectivity-settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.connectivity-settings-actions > button {
  min-width: 260px;
}

.operator-log-toggle {
  flex: 1 1 320px;
  min-height: 44px;
}

#syncOfflineSimulationStatus.simulated-offline,
#syncOfflineSimulationStatus.browser-offline {
  border-color: #e6c47d;
  background: #fff4de;
  color: #8a4b08;
}

#syncOfflineSimulationStatus.unavailable {
  color: var(--muted);
}

#syncOfflineSimulationStatus.degraded,
#syncOfflineSimulationStatus.attention {
  border-color: #e3aaa4;
  background: #fff1ef;
  color: var(--danger);
}

.operating-policy-card,
.operating-explanation-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.operating-rule-note,
.operating-prototype-note {
  padding: 12px;
  color: var(--muted);
  background: #f7f8f8;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.operating-rule-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.operating-rule-note p,
.operating-prototype-note {
  margin: 0;
  line-height: 1.45;
}

.operating-model-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.operating-model-list div {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.operating-model-list dt {
  color: var(--ink);
  font-weight: 900;
}

.operating-model-list dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.security-policy-card,
.security-accounts-card,
.security-audit-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.security-policy-card {
  grid-row: span 2;
}

.security-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.security-card-heading h3 {
  margin: 0 0 3px;
}

.security-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.security-methods-fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px;
}

.security-methods-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.security-methods-fieldset label,
.security-toggle {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.3;
}

.security-methods-fieldset input,
.security-toggle input,
.auth-remember input {
  min-height: auto;
  width: 18px;
  height: 18px;
  padding: 0;
  flex: 0 0 auto;
}

.security-number-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-account-list,
.auth-audit-log {
  display: grid;
  gap: 8px;
}

.auth-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  padding: 10px;
}

.auth-account-row strong,
.auth-account-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-account-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.auth-role-pill,
.auth-method-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e4f3f1;
  color: #006b64;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.auth-audit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  align-items: baseline;
  border-left: 3px solid var(--line);
  padding: 5px 0 5px 9px;
}

.auth-audit-row time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.auth-audit-row small {
  grid-column: 2;
  color: var(--muted);
}

.auth-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: start center;
  overflow: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(39, 156, 147, .26), transparent 34%),
    linear-gradient(135deg, #13202e 0%, #1f3447 48%, #0e6f69 130%);
  padding: 18px;
}

.auth-backdrop[hidden] {
  display: none;
}

.auth-dialog {
  display: grid;
  gap: 0;
  width: min(500px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
  overflow: hidden;
  margin: 12px 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f5;
  padding: 12px 18px;
}

.auth-brand img {
  display: block;
  max-width: min(230px, 58vw);
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.auth-scope-recovery {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #e2a6a0;
  background: #fff1f0;
  color: #7a271a;
  padding: 16px 20px;
}

.auth-scope-recovery[hidden] {
  display: none;
}

.auth-scope-recovery p {
  margin: 0;
  line-height: 1.4;
}

.auth-scope-recovery a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  text-decoration: none;
}

.auth-step {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.auth-step[hidden] {
  display: none;
}

.auth-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 3px;
}

.auth-heading h1 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-eyebrow {
  color: #007c72;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 850;
}

.auth-field input {
  min-height: 48px;
  font-size: 16px;
}

.auth-field.compact input {
  min-height: 42px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-primary-button {
  min-height: 48px;
  width: 100%;
}

.auth-primary-button small,
.auth-provider-button small {
  opacity: .7;
  font-size: 9px;
  letter-spacing: .08em;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.auth-provider-button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
}

.auth-provider-button:hover,
.auth-provider-button:focus-visible {
  border-color: var(--accent);
  background: #f2fbfa;
}

.auth-provider-button strong {
  color: #007c72;
  font-size: 13px;
}

.auth-provider-button span {
  font-weight: 900;
}

.auth-offline-box,
.auth-demo-credentials {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  padding: 0 11px;
}

.auth-offline-box summary,
.auth-demo-credentials summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 850;
}

.auth-offline-box summary span {
  color: #9b6300;
  font-size: 9px;
}

.auth-offline-box > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.auth-offline-box > button {
  width: 100%;
  margin: 9px 0 11px;
}

.auth-demo-credentials > div {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
  font-size: 12px;
}

.auth-demo-credentials code {
  width: fit-content;
  border-radius: 3px;
  background: #e9ecef;
  padding: 2px 5px;
}

.auth-error {
  margin: 0;
  border: 1px solid #d97777;
  border-radius: 3px;
  background: #fff0f0;
  color: #8d1d1d;
  padding: 9px 10px;
  font-weight: 800;
  line-height: 1.35;
}

.auth-technical-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.auth-link-button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #007c72;
  font-weight: 850;
}

body.auth-locked {
  overflow: hidden;
}

@media (max-width: 760px) {
  .security-settings-grid,
  .operating-settings-grid,
  .security-number-grid,
  .security-methods-fieldset {
    grid-template-columns: 1fr;
  }

  .security-policy-card {
    grid-row: auto;
  }

  .security-settings-head,
  .security-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-backdrop {
    place-items: start center;
    padding: 10px;
  }

  .auth-dialog {
    width: 100%;
    max-width: 500px;
    margin: 4px 0;
  }

  .auth-step {
    padding: 16px;
  }

  .auth-provider-grid {
    grid-template-columns: 1fr;
  }

  .auth-provider-button {
    grid-template-columns: 50px 1fr auto;
    min-height: 48px;
    padding: 0 12px;
    text-align: left;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Roboto, Arial, sans-serif;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  padding: 0 0 8px;
}

.app-shell.operator-console-visible {
  grid-template-rows: minmax(0, 1fr) var(--operator-console-height);
}

.operator-event-console {
  z-index: 30;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-top: 3px solid #6aa84f;
  background: #152019;
  color: #f3f7f4;
  box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.2);
}

.operator-event-console[hidden] {
  display: none;
}

.operator-event-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 14px;
}

.operator-event-console-head > div:first-child {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  gap: 10px;
}

.operator-event-console-head strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.operator-event-console-head span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #b7c8bc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-event-console-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.operator-event-console-actions button {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.22);
  background: #23342a;
  color: #f3f7f4;
  padding: 6px 10px;
}

.operator-event-log {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 14px 12px;
  font: 12px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.operator-event-entry {
  display: grid;
  grid-template-columns: 74px 104px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  border-left: 3px solid #8fb8d8;
  background: rgba(255, 255, 255, 0.055);
  padding: 6px 9px;
}

.operator-event-entry[data-level="success"] {
  border-left-color: #78b68f;
}

.operator-event-entry[data-level="warning"] {
  border-left-color: #e6c47d;
}

.operator-event-entry[data-level="error"] {
  border-left-color: #e3aaa4;
}

.operator-event-entry time,
.operator-event-entry code {
  color: #b7c8bc;
}

.operator-event-entry code {
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-event-entry span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.operator-event-log .empty-state {
  border-color: rgba(255, 255, 255, 0.24);
  color: #b7c8bc;
}

.top-bar,
.scan-band,
.workspace-grid,
.operations-grid {
  max-width: 1480px;
  margin: 0 auto;
}

.top-bar {
  position: absolute;
  z-index: 35;
  top: 8px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: min(460px, 100vw);
  max-width: none;
  padding: 0;
  pointer-events: none;
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
  width: auto;
  height: 50px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center center;
  transform: none;
  transform-origin: center center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 16px;
}

h2 {
  font-size: 16px;
}

p,
.section-label,
.panel-head span {
  color: var(--muted);
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
  margin-left: auto;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
  pointer-events: auto;
}

.status-pill {
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--accent-2);
  font-weight: 700;
  text-align: center;
}

.menu-status {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.role-select,
.service-inline,
.opening-balance-field,
.opening-note-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-button {
  display: grid;
  gap: 4px;
  place-content: center;
  width: 46px;
  height: 46px;
  margin-right: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
}

.app-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 12px;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 88px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-menu[hidden] {
  display: none;
}

.menu-group {
  display: grid;
  gap: 8px;
}

.menu-group + .menu-group {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.menu-item {
  min-height: 44px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
  font-weight: 900;
}

.menu-item.active {
  background: var(--accent);
  color: #ffffff;
}

select,
input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.scan-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.main-panel {
  display: none;
  min-height: 0;
}

.main-panel.active {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.scan-form {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 112px;
  gap: 10px;
  margin-top: 6px;
  position: relative;
}

.scan-form input {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.icon-button,
.danger-button {
  min-height: 44px;
  border-radius: 3px;
  padding: 0 14px;
  font-weight: 800;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.danger-button {
  border: 1px solid #d7aaa5;
  background: #f7ddda;
  color: var(--danger);
}

.active-cup {
  display: grid;
  align-content: center;
  justify-items: end;
  border-radius: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #27364b, #0d9488);
  color: #ffffff;
}

.active-cup span {
  color: #b4c6bd;
  font-size: 16px;
}

.active-cup strong {
  font-size: 16px;
  line-height: 1;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 460px);
  gap: 10px;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: var(--divider);
}

.cup-panel,
.product-panel,
.ticket-panel,
.operation-panel {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cup-panel,
.product-panel,
.ticket-panel {
  min-height: 0;
  height: 100%;
}

.product-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.product-workspace {
  grid-row: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.section-layout-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 6px 10px;
}

.section-layout-control.editing {
  border-bottom-color: #d7b35f;
  background: #fff8e8;
  box-shadow: inset 5px 0 0 #c78a00;
}

.section-layout-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.section-layout-heading strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-layout-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-layout-heading span.dirty {
  color: #8a5200;
  font-weight: 900;
}

.section-layout-actions,
.section-display-mode-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-display-mode-controls[hidden],
.section-layout-actions button[hidden] {
  display: none;
}

.section-layout-actions button,
.section-display-mode-controls button {
  min-height: 40px;
  padding-inline: 11px;
  white-space: nowrap;
}

.section-display-mode-controls button.active,
.section-display-mode-controls button[aria-pressed="true"] {
  border-color: var(--accent);
  background: #e7f5f2;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.sales-availability {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8c078;
  background: #fff7e8;
  color: #6d3f00;
}

.sales-availability[hidden] {
  display: none;
}

.sales-availability-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sales-availability-copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.sales-availability-copy span {
  color: #805200;
  font-size: 14px;
  line-height: 1.25;
}

.sales-availability .primary-button {
  flex: 0 0 auto;
  min-height: 44px;
  white-space: nowrap;
}

.opening-setup-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid #d79a22;
  background: #fff7e8;
  color: #6d3f00;
  padding: 14px;
}

.opening-setup-gate[hidden] {
  display: none;
}

.opening-setup-gate > div,
.sync-device-simple-setup > div {
  display: grid;
  gap: 4px;
}

.opening-setup-gate strong,
.sync-device-simple-setup strong {
  font-size: 18px;
}

.opening-setup-gate span:not(.opening-setup-symbol) {
  font-size: 15px;
  font-weight: 700;
}

.opening-setup-symbol,
.sync-device-simple-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d97706;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.cup-list,
.product-grid,
.ticket-items,
.print-queue,
.event-log {
  padding: 14px;
}

.cup-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.cup-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 8px;
  box-shadow: var(--shadow);
}

.cup-search-results[hidden] {
  display: none;
}

.cup-result {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  padding: 8px;
}

.cup-result.active {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 124, 114, 0.14);
}

.cup-token,
.color-chip {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 2px;
  color: #101513;
  font-weight: 900;
}

.cup-meta {
  display: grid;
  gap: 4px;
}

.cup-meta strong {
  font-size: 16px;
}

.cup-meta span,
.cup-total {
  color: var(--muted);
  font-size: 16px;
}

.category-tabs {
  grid-row: 3;
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 6px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: #aeb7bf;
  border-radius: 2px;
}

.category-tab {
  position: relative;
  flex: 1 0 max-content;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fbfbfb;
  color: var(--ink);
  padding: 5px 7px 5px 11px;
  text-align: left;
}

.category-tab::before {
  content: "";
  position: absolute;
  inset-block: 5px;
  inset-inline-start: 4px;
  width: 3px;
  border-radius: 0;
  background: var(--tab-accent);
  opacity: 0.35;
}

.category-tab strong {
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}

.category-tab span {
  display: grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.category-tab.active {
  border-color: var(--accent-2);
  background: #f3f8ef;
  box-shadow: inset 0 0 0 2px var(--accent-2);
  outline: 0;
}

.category-tab.active::before {
  opacity: 1;
}

.category-tab.editing {
  border-color: #bd8100;
  background: #fff4d6;
  box-shadow: inset 0 0 0 2px #bd8100;
}

.category-tab.editing::after {
  content: "Layout";
  grid-column: 1 / -1;
  color: #764f00;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-grid {
  order: initial;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  grid-auto-rows: max-content;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  background: #eef0f2;
}

.product-grid.list-mode {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
}

.product-grid.list-mode:not(.layout-mode) .product-tile {
  grid-template-columns: minmax(0, 1fr) 54px;
  grid-template-rows: minmax(64px, auto);
}

.product-grid.list-mode:not(.layout-mode) .product-tile:not(.has-lady) {
  grid-template-columns: minmax(0, 1fr);
}

.product-grid.list-mode:not(.layout-mode) .product-order-action {
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: minmax(54px, auto);
  align-items: center;
  min-height: 64px;
  padding: 5px 10px 5px 5px;
  text-align: left;
}

.product-grid.list-mode:not(.layout-mode) .product-photo {
  width: 54px;
  min-height: 54px;
}

.product-grid.list-mode:not(.layout-mode) .product-logo {
  width: 52px;
  max-height: 52px;
}

.product-grid.list-mode:not(.layout-mode) .product-name {
  justify-items: start;
  min-height: 0;
}

.product-grid.list-mode:not(.layout-mode) .product-title,
.product-grid.list-mode:not(.layout-mode) .product-title-main,
.product-grid.list-mode:not(.layout-mode) .product-title-promo {
  overflow: visible;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.product-grid.list-mode:not(.layout-mode) .product-lady-action {
  min-height: 64px;
}

.product-grid.layout-mode {
  background-color: #f6f0df;
  background-image: linear-gradient(rgba(143, 103, 19, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 103, 19, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.product-grid.layout-mode .layout-product-tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 156px;
  border: 2px solid #c8a34e;
  cursor: grab;
  overflow: visible;
}

.product-grid.layout-mode .layout-product-tile.dragging {
  opacity: 0.55;
}

.product-grid.layout-mode .layout-product-tile.drag-target {
  outline: 4px solid rgba(0, 124, 114, 0.32);
  transform: translateY(-2px);
}

.layout-product-preview {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 7px;
  position: relative;
}

.layout-product-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: center;
}

.layout-product-identity strong,
.layout-product-identity span {
  overflow-wrap: anywhere;
}

.layout-product-identity strong {
  font-size: 14px;
  line-height: 1.18;
}

.layout-product-identity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.layout-drag-handle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c8a34e;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  color: #745000;
  font-weight: 900;
}

.layout-product-actions {
  display: grid;
  grid-template-columns: 40px 40px minmax(0, 1fr);
  gap: 4px;
  border-top: 1px solid #dcc987;
  padding: 5px;
  background: #fffaf0;
}

.layout-product-actions button {
  min-height: 38px;
  padding: 0 7px;
  font-size: 12px;
}

.product-grid.list-mode.layout-mode .layout-product-tile {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(72px, auto);
  min-height: 72px;
}

.product-grid.list-mode.layout-mode .layout-product-preview {
  grid-template-columns: 58px minmax(0, 1fr) 32px;
  grid-template-rows: minmax(58px, auto);
  align-items: center;
}

.product-grid.list-mode.layout-mode .layout-product-preview .product-photo {
  width: 58px;
  min-height: 58px;
}

.product-grid.list-mode.layout-mode .layout-product-preview .product-logo {
  width: 56px;
  max-height: 56px;
}

.product-grid.list-mode.layout-mode .layout-product-identity {
  text-align: left;
}

.product-grid.list-mode.layout-mode .layout-drag-handle {
  position: static;
}

.product-grid.list-mode.layout-mode .layout-product-actions {
  grid-template-columns: 40px 40px 92px;
  border-top: 0;
  border-left: 1px solid #dcc987;
  align-items: center;
}

.section-add-product-tile {
  display: grid;
  place-content: center;
  gap: 3px;
  min-height: 156px;
  border: 2px dashed #a77b1f;
  border-radius: 3px;
  background: rgba(255, 253, 247, 0.92);
  color: #684800;
  text-align: center;
  padding: 12px;
}

.section-add-product-tile strong {
  font-size: 38px;
  line-height: 0.9;
}

.section-add-product-tile span {
  font-weight: 900;
}

.section-add-product-tile small {
  color: #7e6a3c;
  font-weight: 700;
}

.product-grid.list-mode .section-add-product-tile {
  min-height: 68px;
  grid-template-columns: auto auto auto;
  align-items: center;
}

.section-layout-empty {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
}

.section-layout-empty span {
  color: var(--muted);
}

.product-tile {
  position: relative;
  display: grid;
  grid-template-rows: minmax(112px, 1fr);
  min-height: 0;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  overflow: hidden;
}

.product-tile.has-lady {
  grid-template-rows: minmax(112px, 1fr) 44px;
}

.product-order-action {
  display: grid;
  grid-template-rows: 68px minmax(36px, auto);
  align-content: start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 112px;
  border: 0;
  border-radius: 0;
  padding: 7px 6px 6px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
}

.product-photo {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 68px;
  border-radius: 2px;
  color: #ffffff;
  box-shadow: inset 0 -18px 42px rgba(16, 24, 40, 0.16);
}

.product-photo.has-logo {
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.product-photo.has-logo span {
  display: none;
}

.product-logo {
  display: block;
  width: min(100%, 82px);
  height: auto;
  max-height: 68px;
  object-fit: contain;
}

.product-photo span {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  padding-left: 0;
  text-shadow: 0 1px 4px rgba(16, 24, 40, 0.35);
}

.product-name {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
}

.product-order-action .product-title {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.product-order-action .product-title.with-promo {
  display: grid;
  gap: 2px;
}

.product-order-action .product-title-main,
.product-order-action .product-title-promo {
  display: block;
  min-width: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.product-order-action .product-title-main {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.product-order-action .product-title-promo {
  color: var(--warning);
  font-size: 10px;
  font-weight: 900;
}

.product-lady-action {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #f4faf7;
  color: var(--accent);
  line-height: 1;
}

.product-order-action:hover:not(:disabled),
.product-lady-action:hover:not(:disabled) {
  background: #eaf5ef;
}

.product-order-action:active:not(:disabled),
.product-lady-action:active:not(:disabled) {
  background: #dceee5;
}

.product-order-action:focus-visible,
.product-lady-action:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--accent-2);
  outline-offset: -3px;
}

.product-order-action:disabled,
.product-lady-action:disabled {
  background: #f3f4f6;
  color: #98a2b3;
  cursor: not-allowed;
}

.product-order-action:disabled .product-photo {
  filter: grayscale(0.75);
  opacity: 0.55;
}

.lady-face-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.18em;
}

.lady-face-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.product-lady-icon {
  width: 32px;
  height: 32px;
}

.ticket-lady-icon {
  margin-left: 5px;
  width: 24px;
  height: 24px;
}

.lady-hair {
  fill: #1f130f;
}

.lady-face {
  fill: #d9a27f;
}

.lady-eye {
  fill: #1d1411;
}

.lady-mouth {
  fill: none;
  stroke: #8f3a33;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.product-lady-action:disabled .lady-face-icon {
  opacity: 0.45;
}

.ticket-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  padding-top: 66px;
}

.ticket-cup-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f8;
}

.ticket-cup-search .scan-form {
  grid-template-columns: 86px 96px 96px;
  align-items: center;
  margin-top: 0;
}

.ticket-cup-search .scan-form input {
  font-size: 24px;
  width: 96px;
  text-align: center;
}

.ticket-cup-search .color-chip {
  width: 86px;
  min-width: 86px;
  min-height: 56px;
  font-size: 24px;
}

.staff-card-scan-status {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 2px solid #3f7d20;
  border-radius: 3px;
  background: #ecfdf3;
  padding: 8px 10px;
  color: #14532d;
}

.staff-card-scan-status[hidden] {
  display: none;
}

.staff-card-scan-status img {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  object-fit: cover;
}

.staff-card-scan-status div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-card-scan-status strong,
.staff-card-scan-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-card-scan-status strong {
  font-size: 16px;
}

.staff-card-scan-status span {
  font-size: 13px;
  font-weight: 800;
}

.service-inline {
  display: grid;
  grid-template-columns: minmax(128px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 128px;
}

.service-inline[hidden] {
  display: none;
}

.service-inline select {
  width: 100%;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.order-assignment-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 8px 12px;
  align-items: end;
  margin-top: 10px;
}

.order-staff-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.order-staff-status.required {
  color: #9a3412;
  font-weight: 800;
}

.order-staff-status.confirmed {
  color: #166534;
  font-weight: 800;
}

.ticket-staff-attribution {
  display: block;
  margin-top: 3px;
  color: #53606c;
  font-size: 11px;
  font-weight: 750;
}

.ticket-scroll-area {
  display: grid;
  grid-template-rows: max-content max-content max-content;
  align-content: start;
  gap: 0;
  overflow: auto;
  min-height: 0;
}

.ticket-items {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.ticket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 8px;
  background: var(--surface);
}

.ticket-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
}

.ticket-item-copy {
  min-width: 0;
}

.ticket-item-copy .ticket-item-name {
  display: flex;
}

.ticket-item-name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  line-height: 1.1;
  white-space: nowrap;
}

.ticket-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 50px;
  flex: 0 0 auto;
  border-radius: 2px;
  padding: 2px 8px;
  background: #eef2f6;
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ticket-price-stack {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.quantity-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.quantity-button {
  min-height: 44px;
  border-radius: 2px;
  background: var(--accent);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.quantity-button.minus {
  background: #eceff1;
  color: var(--danger);
}

.quantity-button:disabled {
  background: #eef2f6;
  color: #98a2b3;
  cursor: not-allowed;
}

.ticket-list-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, max-content);
  align-items: start;
  column-gap: 14px;
  margin: 0 14px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.ticket-total-block {
  display: grid;
  gap: 4px;
}

.ticket-grand-total-block {
  justify-items: end;
  text-align: right;
}

.ticket-list-total span {
  color: var(--muted);
  font-weight: 800;
}

.ticket-list-total strong {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.new-order-panel {
  display: grid;
  margin: 0 14px 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.pending-order-items {
  display: grid;
  gap: 5px;
  width: 100%;
}

.pending-order-empty {
  min-height: 30px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.pending-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(96px, max-content) 86px;
  align-items: center;
  column-gap: 8px;
  min-height: 56px;
  border: 1px solid #edf0f2;
  border-radius: 2px;
  background: #fbfcfd;
  padding: 5px 8px;
  color: var(--ink);
  font-size: 15px;
}

.pending-order-line span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.12;
  text-overflow: clip;
  white-space: normal;
}

.pending-order-line strong {
  justify-self: end;
  color: var(--accent-2);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pending-order-line em {
  justify-self: end;
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ticket-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 16px;
}

.void-button {
  min-height: 38px;
  border-radius: 8px;
  background: #f7ddda;
  color: var(--danger);
  font-weight: 900;
}

.ticket-summary {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.ticket-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ticket-actions .receipt-print-button {
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.payment-box {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #f7f8f8;
}

.change-due {
  border-radius: 10px;
  padding: 0;
  font-weight: 900;
  min-height: 0;
  box-sizing: border-box;
}

.change-due:empty {
  display: none;
}

.change-due:not(:empty) {
  min-height: 56px;
  border: 3px solid #b45309;
  background: #fff7ed;
  color: #7c2d12;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18), 0 4px 12px rgba(124, 45, 18, 0.16);
}

.cash-tools {
  display: grid;
  gap: 8px;
}

.cash-tools[hidden] {
  display: none;
}

.cash-entry-row {
  display: grid;
  grid-template-columns: minmax(92px, 118px) 1fr;
  align-items: center;
  gap: 8px;
}

.cash-tools input {
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.cash-suggestions {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 8px;
}

.tender-button {
  min-height: 38px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

.tender-button.qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #17231f;
  color: #ffffff;
  border-color: #17231f;
  font-size: 12px;
}

.qr-symbol {
  display: block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
  background: #ffffff;
}

.ticket-summary span {
  color: var(--muted);
  font-size: 16px;
}

.ticket-summary strong {
  display: block;
  font-size: 16px;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px 0;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.operations-grid.two-up {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.operations-grid.single-up {
  grid-template-columns: minmax(320px, 720px);
  justify-content: center;
}

.operation-panel {
  min-height: 245px;
}

.product-management,
.expense-management,
.printer-management,
.employee-management {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--divider);
  padding-top: 66px;
}

.expense-management {
  grid-template-rows: auto auto minmax(120px, 1fr) auto;
}

.product-management-head,
.expense-management-head,
.printer-management-head,
.employee-management-head {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.product-management-head div,
.expense-management-head div,
.printer-management-head div,
.employee-management-head div,
.printer-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-management-head span,
.expense-management-head span,
.printer-management-head span,
.employee-management-head span,
.printer-title-block span {
  color: var(--muted);
  font-weight: 800;
}

.product-admin-tools {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(150px, 210px) minmax(112px, max-content) auto;
  align-items: center;
  gap: 8px;
}

.expense-admin-tools {
  display: grid;
  grid-template-columns: minmax(150px, 190px) auto;
  align-items: center;
  gap: 8px;
}

.product-show-inactive {
  min-width: 112px;
}

.panel-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-product-button,
.add-expense-button,
.add-printer-button,
.add-employee-button {
  min-width: 138px;
}

.product-admin-grid,
.expense-list,
.printer-grid,
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.product-admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.expense-list {
  grid-template-columns: 1fr;
}

.employee-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: max-content;
}

.expense-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px 14px;
}

.expense-total-card {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 10px 12px;
}

.expense-total-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-total-card strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.expense-row {
  display: grid;
  grid-template-columns: 88px 86px minmax(0, 1fr) 126px 116px 104px;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 10px;
}

.expense-row.voided {
  background: #fbfbfb;
  color: var(--muted);
}

.expense-receipt-thumb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 60px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.expense-receipt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expense-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.expense-main h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-main p {
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-pill {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border-radius: 2px;
  background: #eef2f6;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.expense-pill.cash {
  background: #ecfdf3;
  color: var(--cash);
}

.expense-pill.qr {
  background: #edf2ff;
  color: #244f9e;
}

.expense-amount {
  justify-self: end;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expense-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.financial-management {
  max-height: min(48vh, 520px);
  border: 1px solid var(--line);
  background: #ffffff;
  overflow: auto;
}

.financial-management > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  cursor: pointer;
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: 900;
}

.financial-management > summary small {
  color: var(--muted);
  font-weight: 800;
}

.financial-management-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
}

.financial-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.financial-management-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.financial-account-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.financial-account-list {
  display: grid;
  gap: 8px;
}

.financial-account-row {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 140px minmax(220px, auto);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px;
}

.financial-account-row.settled {
  background: #f8fafc;
  color: var(--muted);
}

.financial-account-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.financial-account-main h3,
.financial-account-main p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-account-main p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.financial-account-balance {
  justify-self: end;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.financial-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 8px;
}

.printer-profile-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 360px;
  overflow: hidden;
}

.printer-profile-card.disabled {
  background: #fbfbfb;
}

.printer-card-head {
  align-items: start;
  min-height: 78px;
}

.printer-card-actions {
  display: grid;
  grid-template-columns: 112px 88px;
  gap: 8px;
}

.printer-profile-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  min-height: 0;
}

.printer-status-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.printer-status-row span:last-child {
  justify-self: end;
  color: var(--muted);
  font-weight: 800;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #98a2b3;
}

.status-dot.online {
  background: var(--accent-2);
}

.status-dot.offline {
  background: var(--danger);
}

.printer-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.printer-meta-grid span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 8px 10px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.printer-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.printer-secondary-actions button:disabled {
  background: #eef2f6;
  color: #98a2b3;
  cursor: not-allowed;
}

.product-admin-card,
.employee-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 310px;
  overflow: hidden;
}

.product-admin-card {
  min-height: 382px;
}

.product-admin-card.inactive,
.employee-card.inactive {
  background: #fbfbfb;
}

.product-admin-card.inactive .product-admin-photo,
.product-admin-card.inactive .product-admin-card-body {
  opacity: 0.68;
}

.employee-card.present {
  box-shadow: inset 0 0 0 3px rgba(106, 168, 79, 0.42);
}

.employee-photo,
.employee-photo-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #eef2f6;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.employee-photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 150px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: #dfe5ea;
  font-size: 32px;
}

.employee-photo img,
.employee-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-admin-card-body,
.employee-card-body {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
}

.product-admin-photo {
  aspect-ratio: auto;
  height: 138px;
  min-height: 138px;
  background: #ffffff;
}

.product-admin-photo img {
  object-fit: contain;
  padding: 10px;
}

.product-admin-card .employee-meta-grid span {
  display: flex;
  align-items: center;
  min-height: 40px;
  overflow: visible;
  font-size: 13px;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
}

.employee-card .employee-meta-grid span {
  display: flex;
  align-items: center;
  min-height: 40px;
  overflow: visible;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
}

.product-promotion-note {
  border-left: 4px solid #b7791f;
  background: #fffbeb;
  color: #7a2e0e !important;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal !important;
}

.product-status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border: 1px solid #98d8b2;
  border-radius: 2px;
  background: #ecfdf3;
  color: #027a48;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-status-pill.archived {
  border-color: #c7cdd4;
  background: #eef2f6;
  color: #475467;
}

.employee-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.employee-title-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-role-pill,
.employee-status-pill {
  min-height: 28px;
  border-radius: 2px;
  padding: 5px 8px;
  background: #eef2f6;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-status-pill.present {
  background: #ecfdf3;
  color: #027a48;
}

.employee-status-pill.away {
  background: #f7ddda;
  color: var(--danger);
}

.employee-card-body p {
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.employee-meta-grid span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 8px 10px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}

.employee-card-actions.single {
  grid-template-columns: 1fr;
}

.employee-card-reference-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.employee-card-reference-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-card-reference-box small {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.employee-card-output-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.employee-card-output-actions button {
  min-width: 0;
}

.attendance-button.present {
  background: #ecfdf3;
  color: #027a48;
}

.attendance-button.away {
  background: var(--accent);
  color: #ffffff;
}

.guest-signal-pill.neutral {
  background: #eef2f6;
  color: var(--ink);
}

.guest-signal-pill.good {
  background: #ecfdf3;
  color: #027a48;
}

.guest-signal-pill.watch {
  background: #fff4de;
  color: var(--warning);
}

.guest-signal-pill.banned {
  background: #f7ddda;
  color: var(--danger);
}

.identity-management {
  display: block;
  height: 100%;
  overflow: auto;
  background: var(--divider);
}

.identity-management-head {
  position: sticky;
  z-index: 4;
  top: 0;
}

.identity-head-status {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px !important;
}

.identity-status-pill {
  min-width: 180px;
  font-size: 13px;
}

.identity-offline-toggle,
.identity-consent-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.identity-offline-toggle input,
.identity-consent-check input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.identity-workspace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px;
}

.identity-step-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
}

.identity-step-card label:not(.identity-consent-check) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-step-card input,
.identity-step-card select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 8px 10px;
  color: var(--ink);
}

.identity-step-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.identity-step-heading div {
  display: grid;
  gap: 4px;
}

.identity-step-heading h3 {
  margin: 0;
  font-size: 16px;
}

.identity-step-heading p,
.identity-warning {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.identity-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #ffffff;
  font-weight: 900;
}

.identity-receipt-payload {
  margin: 4px 0 0;
  min-height: 62px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 11px;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
}

.companion-receipt-qr {
  align-self: start;
  justify-self: start;
  min-width: 132px;
  min-height: 132px;
  width: 132px;
  height: 132px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 4px;
  overflow: hidden;
}

.companion-receipt-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.identity-inline-fields,
.identity-button-stack {
  display: grid;
  gap: 8px;
}

.identity-inline-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.identity-challenge-display {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 96px;
  border: 1px dashed var(--line);
  background: #f8fafc;
  padding: 10px;
}

.identity-challenge-display > div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.identity-challenge-display strong,
.identity-challenge-display small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-challenge-display small {
  color: var(--muted);
}

.identity-qr-placeholder {
  width: 72px;
  height: 72px;
  border: 5px solid #ffffff;
  outline: 1px solid var(--line);
  background:
    linear-gradient(90deg, #111 12%, transparent 12% 24%, #111 24% 39%, transparent 39% 52%, #111 52% 68%, transparent 68% 79%, #111 79%),
    linear-gradient(#111 10%, transparent 10% 22%, #111 22% 35%, transparent 35% 51%, #111 51% 67%, transparent 67% 82%, #111 82%);
  background-blend-mode: multiply;
}

.identity-qr-placeholder.verified {
  outline: 3px solid var(--accent);
}

.identity-overview-section {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.identity-person-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px;
}

.identity-person-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px;
}

.identity-person-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.identity-person-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.identity-person-title h3 {
  margin: 0;
}

.identity-assurance-pill {
  min-width: 36px;
  border-radius: 2px;
  padding: 5px 8px;
  background: #eef2f6;
  font-weight: 900;
  text-align: center;
}

.identity-assurance-pill.a2,
.identity-assurance-pill.a3 {
  background: #ecfdf3;
  color: #027a48;
}

.identity-status-pill.ready {
  background: #ecfdf3;
  color: #027a48;
}

.identity-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.identity-facts div {
  min-width: 0;
  border-left: 3px solid var(--line);
  padding-left: 8px;
}

.identity-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-facts dd {
  overflow: hidden;
  margin: 2px 0 0;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-person-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.identity-person-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.identity-person-meta code {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-cup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.guest-cup-row label,
.guest-note-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.guest-cup-row select {
  width: 100%;
  font-weight: 900;
}

.print-queue,
.event-log {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.print-job,
.event-row {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px;
  background: var(--surface);
}

.print-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.print-job-actions,
.standby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.print-job-actions button {
  min-height: 36px;
  padding: 7px 10px;
}

.print-job strong,
.event-row strong {
  display: block;
}

.print-job small,
.event-row small {
  color: var(--muted);
}

.operations-grid.opening-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  align-content: stretch;
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  overflow: hidden;
  background: var(--divider);
  padding: 66px 0 0;
}

.opening-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
}

.opening-head {
  align-items: flex-start;
}

.opening-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.opening-head span {
  color: var(--muted);
  font-weight: 800;
}

.opening-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.opening-head-actions [hidden],
.opening-section[hidden] {
  display: none;
}

.opening-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #eef0f2;
}

.opening-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 12px;
}

.opening-section h3 {
  margin: 0;
  font-size: 15px;
}

.opening-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.opening-metric,
.opening-result {
  display: grid;
  gap: 5px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 10px 12px;
}

.opening-metric.expected {
  background: #f3f8ef;
  border-color: #b9d9aa;
}

.opening-metric span,
.opening-result span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.opening-metric strong,
.opening-result strong {
  align-self: end;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.opening-input-grid,
.opening-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.opening-step-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.opening-finish-step {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.opening-balance-field > label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.opening-step-number {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3f7d20;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.opening-amount-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.opening-amount-control .secondary-button {
  min-height: 58px;
  font-size: 17px;
}

.opening-input-grid input {
  min-height: 58px;
  font-size: 28px;
  font-weight: 900;
  text-align: right;
}

.opening-result-grid {
  align-items: stretch;
}

.opening-start-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid #4c7f2d;
  border-radius: 3px;
  background: #f2f8ed;
  padding: 12px;
}

.opening-start-action > div {
  display: grid;
  gap: 3px;
}

.opening-start-action > div > span {
  color: #405d31;
  font-size: 14px;
  font-weight: 700;
}

.opening-start-action .primary-button {
  min-height: 58px;
  padding-inline: 20px;
  font-size: 17px;
}

.opening-result {
  min-height: 96px;
  background: #ffffff;
}

.opening-variance.unknown {
  background: #f8fafc;
}

.opening-variance.balanced {
  background: #ecfdf3;
  border-color: #98d8b2;
  color: #027a48;
}

.opening-variance.short {
  background: #fef3f2;
  border-color: #e3aaa4;
  color: var(--danger);
}

.opening-variance.over {
  background: #fff4de;
  border-color: #e6c47d;
  color: var(--warning);
}

.opening-variance.mixed {
  background: #f4f9fc;
  border-color: #8fb8d8;
  color: #244f9e;
}

.opening-note-field {
  font-size: 13px;
}

.business-day-closing {
  gap: 14px;
}

.business-day-closing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.business-day-closing-head p,
.business-day-offline-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.business-day-close-status {
  border: 1px solid #98d8b2;
  border-radius: 2px;
  background: #ecfdf3;
  color: #027a48;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
}

.business-day-close-status.blocked {
  border-color: #e3aaa4;
  background: #fef3f2;
  color: var(--danger);
}

.opening-metric.device-reported {
  border-style: dashed;
  background: #fffaf0;
}

.business-day-balance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.business-day-offline-note {
  border-left: 5px solid var(--accent);
  background: #f4f9fc;
  padding: 10px 12px;
}

.event-panel {
  background: #fbfbf8;
}

.sync-control-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.operations-grid.sync-grid {
  max-height: 100vh;
  padding: 66px 0 16px;
}

.sync-panel-head,
.sync-events-head {
  align-items: center;
}

.sync-panel-head > div {
  display: grid;
  gap: 3px;
}

.sync-panel-head h2,
.sync-panel-head span,
.sync-events-head h3 {
  margin: 0;
}

.sync-principle-card {
  border: 1px solid #8fd1a9;
  border-radius: 3px;
  background: #ecfdf3;
  padding: 14px 16px;
  color: #027a48;
}

.sync-principle-card strong {
  font-size: 16px;
}

.sync-principle-card p,
.sync-demo-warning p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.sync-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sync-health-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 13px;
}

.sync-health-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-health-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
}

.sync-queue-notice {
  min-height: 42px;
  border: 1px solid #b9c5d2;
  border-radius: 3px;
  background: #f8fafc;
  padding: 11px 13px;
  color: var(--ink);
  font-weight: 800;
}

.sync-queue-notice.warning {
  border-color: #e6c47d;
  background: #fff4de;
  color: #8a4b08;
}

.sync-queue-notice.error {
  border-color: #e3aaa4;
  background: #fef3f2;
  color: var(--danger);
}

.sync-standby-card {
  display: grid;
  gap: 12px;
  border: 1px solid #b9c5d2;
  border-radius: 3px;
  background: #f8fafc;
  padding: 14px;
}

.service-device-card {
  border-color: rgba(251, 191, 36, .38);
}

.sync-device-access-card {
  border-color: #8fb8d8;
  background: #f4f9fc;
}

.sync-device-simple-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid #4c7f2d;
  border-radius: 3px;
  background: #f2f8ed;
  padding: 14px;
}

.sync-device-simple-setup[hidden],
.sync-device-form[hidden],
.sync-device-edit-button[hidden] {
  display: none;
}

.sync-device-simple-setup p {
  color: #405d31;
}

.sync-device-simple-setup .primary-button {
  min-height: 56px;
  padding-inline: 20px;
  font-size: 17px;
}

.sync-device-edit-button {
  justify-self: start;
}

.sync-device-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sync-device-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sync-device-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sync-device-endpoint-field {
  grid-column: 1 / -1;
}

.sync-device-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.sync-device-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sync-device-meta > span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 10px;
}

.sync-device-meta small {
  color: var(--muted);
  font-weight: 800;
}

.sync-configuration-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sync-configuration-message.error {
  color: var(--danger);
}

.sync-standby-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sync-standby-head > div {
  display: grid;
  gap: 3px;
}

.sync-standby-head span,
.sync-standby-card p {
  color: var(--muted);
}

.sync-standby-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sync-standby-grid > span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 10px;
}

.sync-standby-grid small {
  color: var(--muted);
  font-weight: 800;
}

.sync-standby-card p {
  margin: 0;
  line-height: 1.45;
}

.sync-standby-card button {
  justify-self: start;
}

.standby-pairing-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 8px;
}

.standby-pairing-controls label,
.standby-pairing-link {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.standby-pairing-controls input,
.standby-pairing-link textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
}

.standby-pairing-link textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
}

.standby-safety-warning {
  margin: 0;
}

#salesPrintPendingCount {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0 5px;
}

.sync-demo-warning {
  margin: 0;
}

.sync-events-head {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.event-row.sync-conflict {
  border-color: #e3aaa4;
  background: #fef3f2;
}

@media (max-width: 900px) {
  .sync-health-grid,
  .sync-standby-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .standby-pairing-controls {
    grid-template-columns: 1fr 1fr;
  }

  .sync-device-form {
    grid-template-columns: 1fr;
  }

  .sync-device-endpoint-field {
    grid-column: auto;
  }

  .standby-pairing-controls label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .sync-panel-head,
  .sync-events-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-panel-head button {
    width: 100%;
  }

  .sync-health-grid {
    grid-template-columns: 1fr;
  }

  .sync-standby-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-standby-grid {
    grid-template-columns: 1fr;
  }

  .sync-standby-card button {
    justify-self: stretch;
  }

  .standby-pairing-controls,
  .standby-actions {
    grid-template-columns: 1fr;
  }

  .sync-device-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-device-meta {
    grid-template-columns: 1fr;
  }

  .opening-setup-gate,
  .sync-device-simple-setup {
    grid-template-columns: 1fr;
  }

  .opening-setup-symbol,
  .sync-device-simple-symbol {
    justify-self: center;
  }

  .opening-setup-gate .primary-button,
  .sync-device-simple-setup .primary-button {
    width: 100%;
  }

  .opening-start-action {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .opening-start-action .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .standby-actions {
    display: grid;
  }

  .print-job {
    align-items: stretch;
    flex-direction: column;
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 40, 0.38);
  padding: 14px;
  overscroll-behavior: contain;
}

.modal-backdrop[hidden] {
  display: none;
}

.product-dialog,
.expense-dialog,
.printer-dialog,
.employee-dialog,
.financial-dialog,
.qr-payment-dialog,
.section-product-dialog,
.section-unsaved-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(16, 24, 40, 0.28);
  overflow: hidden;
}

.product-dialog {
  width: min(860px, calc(100vw - 28px));
}

.employee-dialog {
  width: min(760px, calc(100vw - 28px));
}

.expense-dialog {
  width: min(820px, calc(100vw - 28px));
}

.financial-dialog {
  width: min(780px, calc(100vw - 28px));
}

.financial-dialog.compact-dialog {
  width: min(620px, calc(100vw - 28px));
}

.qr-payment-dialog {
  width: min(920px, calc(100vw - 28px));
}

.section-product-dialog {
  width: min(980px, calc(100vw - 28px));
}

.section-unsaved-dialog {
  width: min(640px, calc(100vw - 28px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.section-product-dialog-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  background: #eef0f2;
}

.section-product-picker-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.section-product-search,
.section-picker-list-tools label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-picker-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 6px;
}

.section-picker-view-tabs button.active {
  border-color: var(--accent);
  background: #e7f5f2;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.section-picker-panel {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px;
}

.section-picker-panel[hidden] {
  display: none;
}

.section-picker-list-tools {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.section-product-choice-list,
.section-product-category-list {
  display: grid;
  gap: 7px;
}

.section-product-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  padding: 8px 10px;
  cursor: pointer;
}

.section-product-choice:hover {
  border-color: #8bb6ae;
}

.section-product-choice.assigned {
  background: #f1f3f5;
  color: var(--muted);
  cursor: not-allowed;
}

.section-product-choice input {
  width: 22px;
  min-height: 22px;
  margin: 0;
}

.section-product-choice-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.section-product-choice-identity strong {
  overflow-wrap: anywhere;
}

.section-product-choice-identity span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-choice-badge {
  border: 1px solid #9dc9c1;
  border-radius: 999px;
  background: #e7f5f2;
  color: #075b50;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.section-choice-badge.assigned {
  border-color: #c9ced5;
  background: #e4e7eb;
  color: #58606b;
}

.section-product-category {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent-2);
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
}

.section-product-category > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.section-product-category > summary::-webkit-details-marker {
  display: none;
}

.section-product-category > summary::before {
  content: "+";
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: end;
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.section-product-category[open] > summary::before {
  content: "\2212";
}

.section-product-category > summary strong,
.section-product-category > summary span {
  padding-right: 30px;
}

.section-product-category > summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.section-category-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  padding: 7px 9px;
}

.section-product-choice-list.category-choices {
  padding: 8px;
}

.section-product-dialog-actions strong {
  color: var(--accent);
  font-size: 14px;
}

.section-unsaved-dialog-body {
  padding: 20px;
  background: #fff8e8;
}

.section-unsaved-dialog-body p {
  color: #593a00;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.business-close-confirm-summary {
  display: block;
  margin-top: 14px;
  border: 1px solid #e6c47d;
  background: #ffffff;
  color: var(--ink);
  padding: 12px;
  font-size: 16px;
  line-height: 1.5;
}

.dialog-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.dialog-close-button {
  width: 44px;
  padding: 0;
}

.product-form-body,
.expense-form-body,
.printer-form-body,
.employee-form-body,
.financial-form-body,
.qr-payment-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #eef0f2;
}

.form-validation-summary {
  border: 1px solid #e3aaa4;
  border-left: 6px solid var(--danger);
  border-radius: 2px;
  background: #fef3f2;
  color: #8f2f26;
  padding: 11px 12px;
  line-height: 1.35;
}

.form-validation-summary[hidden] {
  display: none;
}

.auth-backdrop input:not([type="checkbox"]):not([type="radio"]),
.auth-backdrop select,
.auth-backdrop textarea,
.modal-backdrop input:not([type="checkbox"]):not([type="radio"]),
.modal-backdrop select,
.modal-backdrop textarea,
.operation-panel input:not([type="checkbox"]):not([type="radio"]),
.operation-panel select,
.operation-panel textarea {
  font-size: 16px;
}

.auth-backdrop label:has(> input[required]) > span:first-of-type::after,
.auth-backdrop label:has(> select[required]) > span:first-of-type::after,
.auth-backdrop label:has(> textarea[required]) > span:first-of-type::after,
.modal-backdrop label:has(> input[required]) > span:first-of-type::after,
.modal-backdrop label:has(> select[required]) > span:first-of-type::after,
.modal-backdrop label:has(> textarea[required]) > span:first-of-type::after,
.operation-panel label:has(> input[required]) > span:first-of-type::after,
.operation-panel label:has(> select[required]) > span:first-of-type::after,
.operation-panel label:has(> textarea[required]) > span:first-of-type::after {
  content: " *";
  color: var(--danger);
}

.required-indicator {
  display: inline-block;
  margin-left: 6px;
  border-radius: 999px;
  background: #f7ddda;
  color: var(--danger);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  vertical-align: middle;
}

.dialog-field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: none;
}

.opening-section > .dialog-field-hint {
  margin-bottom: 12px;
  font-size: 14px;
}

.dialog-advanced-disclosure {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f8fafc;
  padding: 10px 12px;
}

.dialog-advanced-disclosure > summary {
  min-height: 28px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 28px;
  cursor: pointer;
}

.dialog-advanced-disclosure[open] > summary {
  margin-bottom: 10px;
}

.dialog-advanced-disclosure > .dialog-field-hint {
  margin-bottom: 10px;
}

.form-validation-summary.warning {
  border-color: #e6c47d;
  border-left-color: #b54708;
  background: #fffbeb;
  color: #7a2e0e;
}

.form-validation-summary strong {
  display: block;
  margin-bottom: 4px;
}

.form-validation-summary ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 20px;
}

.product-form-section label.field-invalid {
  color: var(--danger);
}

.product-form-section label.field-invalid input,
.product-form-section label.field-invalid select,
.modal-backdrop [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.12);
}

.product-form-section,
.expense-form-section,
.printer-form-section,
.employee-form-section,
.financial-form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 12px;
}

.product-form-section h3,
.expense-form-section h3,
.printer-form-section h3,
.employee-form-section h3,
.financial-form-section h3 {
  margin: 0;
  font-size: 15px;
}

.product-form-grid,
.expense-form-grid,
.printer-form-grid,
.employee-form-grid,
.financial-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.product-form-grid label,
.expense-form-grid label,
.product-single-field,
.printer-form-grid label,
.employee-form-grid label,
.financial-form-grid label,
.printer-command-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-single-field {
  margin-top: 10px;
}

.expense-description-field {
  grid-column: 1 / -1;
}

.financial-note-field {
  grid-column: 1 / -1;
}

.stored-credit-payment-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
}

.stored-credit-payment-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.stored-credit-payment-summary strong {
  font-variant-numeric: tabular-nums;
}

.expense-receipt-editor {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: stretch;
}

.expense-receipt-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-receipt-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-payment-body {
  align-content: start;
}

.qr-payment-amount-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--accent-2);
  border-radius: 2px;
  background: #ffffff;
  padding: 14px 16px;
}

.qr-payment-amount-card.outgoing {
  border-left-color: #244f9e;
}

.qr-payment-amount-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.qr-payment-amount-card strong {
  font-size: clamp(28px, 5vw, 42px);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.qr-payment-amount-card small,
.qr-payment-code-tools p,
.qr-payment-code-tools small,
.qr-provider-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.qr-payment-code-section {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 12px;
}

.qr-payment-code-preview {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  color: var(--muted);
  padding: 12px;
  text-align: center;
  font-weight: 900;
}

.qr-payment-code-preview.compact {
  min-height: 220px;
}

.qr-payment-code-preview img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
  image-rendering: auto;
}

.qr-payment-code-preview svg {
  display: block;
  width: min(100%, 340px);
  height: auto;
  max-height: 340px;
  background: #ffffff;
}

.qr-payment-code-tools,
.qr-payment-code-tools label,
.qr-payment-confirmation-section,
.qr-payment-confirmation-section > label {
  display: grid;
  gap: 8px;
}

.qr-payment-code-tools {
  align-content: start;
}

.qr-standard-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #2b7a4b;
  border-radius: 999px;
  background: #edf8f1;
  color: #185c35;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.qr-merchant-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr);
  gap: 8px;
}

.thai-bank-compatibility {
  display: grid;
  gap: 10px;
  border: 1px solid #aac7df;
  border-left: 7px solid #244f9e;
  border-radius: 2px;
  background: #f4f8fc;
  padding: 12px 14px;
}

.thai-bank-compatibility h3,
.thai-bank-compatibility p,
.thai-bank-compatibility small {
  margin: 0;
}

.thai-bank-compatibility p,
.thai-bank-compatibility small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.thai-bank-compatibility ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thai-bank-compatibility li {
  display: grid;
  gap: 2px;
  border: 1px solid #cbd9e6;
  border-radius: 2px;
  background: #ffffff;
  padding: 8px;
}

.thai-bank-compatibility li strong {
  font-size: 13px;
}

.thai-bank-compatibility li span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.qr-payment-code-tools label > span,
.qr-payment-confirmation-section > label > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.qr-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qr-file-actions .danger-button {
  grid-column: 1 / -1;
}

.qr-payment-confirmation-section,
.qr-payment-workflow {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  padding: 12px;
}

.qr-payment-workflow ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
  line-height: 1.4;
}

.qr-confirmation-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 12px;
}

.qr-confirmation-check input {
  width: 22px;
  min-height: 22px;
  margin: 0;
}

.qr-confirmation-check span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: none;
}

.qr-provider-note {
  border-left: 4px solid #d97706;
  background: #fffbeb;
  padding: 9px 10px;
}

.printer-form-grid label[hidden],
.employee-form-grid label[hidden] {
  display: none;
}

#printerSystemQueueField {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
}

#printerSystemQueueField > label:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.printer-cutter-acceptance {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border: 1px solid #b7791f;
  border-radius: 2px;
  background: #fffbeb;
  padding: 10px;
  text-transform: none;
}

.printer-cutter-acceptance input {
  width: 22px;
  min-height: 22px;
  margin: 0;
}

.printer-cutter-acceptance span {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.printer-queue-refresh-button {
  justify-self: start;
  min-height: 38px;
}

#printerSystemQueueStatus {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.toggle-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 12px;
  background: var(--surface);
}

.toggle-field input {
  min-height: auto;
}

.printer-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.3;
}

.employee-photo-editor {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: stretch;
}

.employee-photo-preview {
  aspect-ratio: 1 / 1;
  min-height: 160px;
  font-size: 20px;
}

.employee-photo-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: center;
}

.employee-fingerprint-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.employee-fingerprint-box span {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fafc;
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  background: #ffffff;
}

.dialog-action-spacer {
  flex: 1 1 auto;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

.empty-state.compact {
  padding: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(80px);
  min-width: 260px;
  max-width: min(560px, calc(100vw - 32px));
  border-radius: 2px;
  background: #17231f;
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 800;
  opacity: 0;
  transition: 180ms ease;
  box-shadow: var(--shadow);
}

body.operator-console-open .toast {
  bottom: calc(var(--operator-console-height) + 18px);
  transform: translateX(-50%);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .top-bar {
    grid-template-columns: 1fr auto;
  }

  .brand-logo {
    width: 100%;
  }

  .workspace-grid,
  .operations-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ticket-panel {
    grid-column: span 2;
  }

  .operations-grid.single-up {
    grid-template-columns: 1fr;
  }

  .printer-command-grid {
    grid-template-columns: 1fr;
  }

  .employee-photo-editor {
    grid-template-columns: 140px 1fr;
  }

  .product-admin-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-row {
    grid-template-columns: 78px minmax(0, 1fr) 112px;
  }

  .financial-account-row {
    grid-template-columns: 130px minmax(0, 1fr) 130px;
  }

  .financial-account-actions {
    grid-column: 1 / -1;
  }

  .opening-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-start-action {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .opening-start-action .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .expense-row .expense-pill,
  .expense-row .expense-actions {
    grid-column: auto;
  }
}

@media (max-width: 740px) {
  body {
    overflow: auto;
  }

  .app-shell {
    padding: 10px;
    height: auto;
    overflow: visible;
  }

  .app-shell.operator-console-visible {
    grid-template-rows: minmax(0, 1fr) minmax(150px, 190px);
    height: 100vh;
    overflow: hidden;
  }

  .operator-event-console {
    max-height: 190px;
  }

  .operator-event-console-head,
  .connectivity-settings-heading,
  .connectivity-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .connectivity-settings-actions > button {
    width: 100%;
    min-width: 0;
  }

  .operator-log-toggle {
    flex-basis: auto;
  }

  .operator-event-entry {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .operator-event-entry span {
    grid-column: 1 / -1;
  }

  body.operator-console-open .toast {
    bottom: calc(190px + 18px);
    transform: translateX(-50%);
  }

  .top-bar,
  .scan-band,
  .app-tabs,
  .workspace-grid,
  .order-assignment-row,
  .operations-grid,
  .product-admin-tools,
  .expense-admin-tools,
  .expense-totals,
  .financial-account-totals,
  .opening-summary-grid,
  .opening-input-grid,
  .opening-result-grid,
  .scan-form,
  .operator-row,
  .qr-merchant-fields,
  .qr-payment-code-section {
    grid-template-columns: 1fr;
  }

  .staff-card-scan-status,
  .employee-card-reference-box,
  .employee-card-output-actions {
    grid-template-columns: 1fr;
  }

  .staff-card-scan-status img {
    display: none;
  }

  .qr-payment-code-preview,
  .qr-payment-code-preview.compact {
    min-height: 220px;
  }

  .top-bar {
    align-items: center;
  }

  .header-actions {
    align-items: center;
    flex-direction: row;
  }

  .active-cup {
    justify-items: start;
  }

  .sales-availability {
    align-items: stretch;
    flex-direction: column;
  }

  .section-layout-control,
  .section-layout-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-layout-actions,
  .section-display-mode-controls {
    width: 100%;
  }

  .section-layout-actions > button,
  .section-display-mode-controls > button {
    flex: 1 1 auto;
  }

  .section-product-picker-tools,
  .section-picker-list-tools {
    grid-template-columns: 1fr;
  }

  .section-picker-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-product-choice {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .section-choice-badge {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .section-product-dialog-actions {
    align-items: stretch;
  }

  .section-product-dialog-actions .dialog-action-spacer {
    display: none;
  }

  .ticket-item,
  .ticket-item-main {
    gap: 6px;
  }

  .pending-order-line {
    grid-template-columns: minmax(0, 1fr) auto 86px;
    row-gap: 5px;
  }

  .pending-order-line > .ticket-item-name {
    grid-column: 1 / -1;
  }

  .pending-order-line > strong {
    grid-column: 1;
  }

  .pending-order-line > em {
    grid-column: 2;
  }

  .pending-order-line > .quantity-actions {
    grid-column: 3;
  }

  .ticket-panel {
    grid-column: auto;
  }

  .product-admin-grid,
  .expense-list,
  .printer-grid,
  .employee-grid {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .product-management-head,
  .expense-management-head,
  .opening-head,
  .printer-management-head,
  .employee-management-head,
  .printer-card-head,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .opening-head-actions,
  .business-day-closing-head {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .opening-head-actions button {
    width: 100%;
  }

  .panel-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .identity-head-status {
    display: grid !important;
    grid-auto-flow: row;
    width: 100%;
  }

  .identity-workspace,
  .identity-person-list {
    grid-template-columns: 1fr;
  }

  .identity-inline-fields {
    grid-template-columns: 1fr;
  }

  .printer-card-actions,
  .printer-secondary-actions,
  .employee-card-actions,
  .employee-fingerprint-box,
  .expense-receipt-editor,
  .employee-photo-editor {
    grid-template-columns: 1fr;
  }

  .expense-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .financial-management-head {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-account-row {
    grid-template-columns: 1fr;
  }

  .financial-account-balance {
    justify-self: start;
  }

  .financial-account-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .expense-row .expense-pill,
  .expense-row .expense-amount,
  .expense-row .expense-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .dialog-action-spacer {
    display: none;
  }

  .product-dialog,
  .expense-dialog,
  .printer-dialog,
  .employee-dialog,
  .financial-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .cup-panel,
  .product-panel,
  .ticket-panel {
    min-height: auto;
  }
}
