*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  --color-primary: #1f76d0;
  --color-primary-hover: #1a67b8;
  --color-bg-page: #f3f7ff;
  --color-bg-surface: #ffffff;
  --color-bg-soft: #f7faff;
  --color-border: #d8e2f1;
  --color-text: #1b2a3b;
  --color-text-muted: #5d6b80;
  --color-success: #1f7a40;
  --color-warning: #d48a00;
  --color-danger: #e14949;
  --shadow-panel: 0 14px 40px rgba(23, 63, 95, 0.08);
  --shadow-raised: 0 18px 46px rgba(16, 44, 90, 0.14);
  --color-toolbar-start: #143c64;
  --color-toolbar-end: #205d92;
  --cli-bg: #0f131a;
  --cli-surface: #151b25;
  --cli-border: #273244;
  --cli-text: #e6edf5;
  --cli-accent: var(--color-primary);
  background-color: var(--color-bg-page);
  color: var(--color-text);
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg-page);
  color: var(--color-text);
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page--home {
  align-items: center;
  justify-content: center;
}

.page--auth {
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-toolbar-start), var(--color-toolbar-end));
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 60, 100, 0.2);
  min-height: 72px;
}

.toolbar__group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toolbar__subtitle {
  font-size: 0.9rem;
  opacity: 0.75;
}

.card {
  background: var(--color-bg-surface);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 60, 100, 0.12);
  padding: 2.5rem 2rem;
  width: min(420px, 92vw);
}

.card--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.card--auth {
  gap: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #e5efff;
  color: #173f67;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  min-height: 40px;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(23, 63, 95, 0.18);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

.button--primary:hover:not(:disabled),
.button--primary:focus-visible {
  background: #155fb0;
  color: #fff;
}

.button--secondary {
  background: var(--color-success);
  color: #fff;
}

.button--secondary:hover:not(:disabled),
.button--secondary:focus-visible {
  background: #218a47;
  color: #fff;
}

.button--danger {
  background: var(--color-danger);
  color: #fff;
}

.button--danger:hover:not(:disabled),
.button--danger:focus-visible {
  background: #b91c1c;
  color: #fff;
}

.button--link {
  background: transparent;
  color: var(--color-primary);
  padding: 0;
  font-weight: 500;
}

.button--link:hover {
  box-shadow: none;
  transform: none;
  text-decoration: underline;
}

.button--inline {
  display: inline;
  font-size: 12px;
  line-height: 1.2;
}

.seat-badge--available {
  background: #2b8a3e;
}

.seat-badge--locked-self {
  background: #ffd166;
}

.seat-badge--locked-other {
  background: #cbd3de;
}

.seat-badge--sold {
  background: #ffffff;
  border: 1px solid var(--color-border);
}

.seat-badge--disabled {
  background: #d7deeb;
}

.seat-table-actions--mt {
  margin-top: 8px;
}

.panel__heading--mt {
  margin-top: 16px;
}

.panel--mt {
  margin-top: 16px;
}

.table__col--select {
  width: 48px;
}

.account-manager-grid--ticket-coupons {
  grid-template-columns: 1fr 1fr;
}

.coupon-project-bar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.coupon-project-bar__summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
}

.divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 12px 0;
}

.seat-table-actions--gap-sm {
  gap: 8px;
}

.table-wrap--scroll {
  margin-top: 8px;
  max-height: 360px;
  overflow: auto;
}

.button--active {
  background: var(--color-primary);
  color: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

input[type='text'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='date'],
input[type='datetime-local'],
select {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  min-height: 40px;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.35;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

input[type='text']:focus,
input[type='number']:focus,
input[type='password']:focus,
input[type='search']:focus,
input[type='date']:focus,
input[type='datetime-local']:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(31, 118, 208, 0.15);
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.status-message {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin: 0;
}

#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  background: var(--color-primary);
  min-width: 180px;
}

.toast--error {
  background: var(--color-danger);
}

.toast--success {
  background: var(--color-success);
}

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

.toast__action {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.toast__action:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.button--sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  line-height: 1.2;
  border-radius: 10px;
}

.status-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.status-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.checkin-result .status-actions {
  margin-top: 10px;
}

.scan-methods {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e3ebf6;
  background: #f7fbff;
  display: grid;
  gap: 8px;
}

.scan-methods--modal {
  margin-top: 12px;
}

.scan-methods__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-methods__title {
  font-weight: 700;
  color: #1b2a3b;
}

.scan-methods__hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.scan-badges {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d7e6fa;
  background: #fff;
  font-size: 0.85rem;
  color: #1b2a3b;
  white-space: nowrap;
}

.scan-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8aa0b8;
  flex: none;
}

.scan-badge--ok::before {
  background: #22c55e;
}

.scan-badge--warn::before {
  background: #f59e0b;
}

.scan-badge--error::before {
  background: #ef4444;
}

.scan-methods__actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #4b5d70;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page--ops {
  background: var(--color-bg-page);
}

.ops-layout {
  flex: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2rem;
  display: grid;
  gap: 1rem;
}

#ops-status {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

#ops-metrics {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  overflow: auto;
  max-height: 360px;
  font-size: 13px;
  line-height: 1.5;
}

#backup-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

#backup-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page--status-redirect {
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.status-redirect-note {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-surface);
  box-shadow: 0 10px 24px rgba(16, 44, 90, 0.08);
  color: var(--color-text);
}

.status-redirect-note a {
  color: var(--color-primary);
  font-weight: 600;
}

.page--admin,
.page--sales {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.page--admin {
  background: var(--color-bg-page);
}

.admin-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem 1.75rem 2rem;
  min-height: 0;
  overflow: hidden;
}

.admin-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.2rem;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.admin-sidebar {
  background: var(--color-bg-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-panel);
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.admin-sidebar__brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.admin-content > * {
  flex-shrink: 0;
}

.panel--workbench {
  padding: 1.2rem 1.4rem;
}

.console-workbench__row {
  display: flex;
  gap: 1.4rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.console-workbench__left {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.console-workbench__right {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.project-selector {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.project-selector input {
  flex: 1;
}

.console-recent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-summary {
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.console-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.console-tab {
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: #1f2a44;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.console-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(31, 118, 208, 0.2);
}

.console-tab.is-active:hover,
.console-tab.is-active:focus-visible,
.ticketing-switch .button.is-active:hover,
.ticketing-switch .button.is-active:focus-visible {
  background: #155fb0;
  border-color: #155fb0;
  color: #fff;
}

.console-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.admin-ticketing-switch {
  margin-bottom: 0.6rem;
}

.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  align-self: stretch;
}

.admin-tab {
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  text-align: left;
  width: 100%;
}

.admin-tab:hover {
  background: #edf4ff;
  color: var(--color-text);
  border-color: #c7d7f2;
}

.admin-tab--active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 10px 20px rgba(31, 118, 208, 0.25);
}

.admin-tab--active:hover,
.admin-tab--active:focus-visible {
  background: #155fb0;
  color: #fff;
}

.admin-tab-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-tab-group__title {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.admin-sidebar__extras {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.admin-nav-link {
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.admin-nav-link:hover {
  background: var(--color-bg-soft);
  border-color: #bfd4f3;
}

.admin-view {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
}

.admin-view--active {
  display: flex;
  align-items: stretch;
}

.admin-view[hidden] {
  display: none !important;
}

.admin-layout {
  flex: 1;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(260px, 320px) 1fr;
  align-items: stretch;
  min-height: 0;
}

.panel {
  background: var(--color-bg-surface);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 0;
}

.panel--list {
  padding: 1.25rem;
  gap: 0.85rem;
  max-height: 75vh;
  overflow: auto;
}

.panel--account-manager {
  gap: 1.5rem;
}

.panel__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel--workspace {
  gap: 1.5rem;
  min-height: 0;
}

.console-panel[data-console-panel='seats'] > .panel--workspace {
  min-height: clamp(680px, 82vh, 1080px);
  overflow: visible;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.workspace-title {
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--color-text);
}

.workspace-title input {
  font-weight: 600;
}

.workspace-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.workspace-body > * {
  min-width: 0;
  min-height: 0;
}

.panel--controls {
  gap: 1rem;
  overflow: auto;
  min-height: 0;
}

.zone-summary ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #51617a;
}

.zone-summary li {
  line-height: 1.4;
}

.ticketing-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel--canvas {
  position: relative;
  gap: 0;
  min-width: 0;
  min-height: 0;
}

.stage-label {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.8rem;
  border-radius: 999px;
  background: #ffcf99;
  color: #7a4b00;
  font-weight: 600;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 2;
}

.seat-canvas {
  flex: 1;
  width: 100%;
  background: linear-gradient(145deg, #f3f7ff, #e4ebf9);
  border-radius: 14px;
  border: 1px solid #d4def1;
  padding: 2.2rem 1rem 1rem;
  overflow: auto;
  position: relative;
  min-width: 0;
  min-height: 360px;
  max-height: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}

#seat-canvas {
  min-height: clamp(520px, 68vh, 960px);
}

#sales-seat-canvas {
  min-height: clamp(460px, 60vh, 820px);
}

.seat-grid-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: fit-content;
  width: max-content;
}

.seat-grid-columns {
  display: grid;
  gap: 8px;
  margin-left: 48px;
  font-size: 0.7rem;
  color: #6d7a8d;
  text-align: center;
}

.seat-grid-columns span {
  display: block;
}

.seat-grid-content {
  display: flex;
  gap: 8px;
  width: max-content;
}

.seat-grid-rows {
  display: grid;
  gap: 8px;
  width: 40px;
  font-size: 0.7rem;
  color: #6d7a8d;
  text-align: center;
  align-items: center;
  justify-items: center;
}

.seat-grid {
  display: grid;
  gap: 8px;
  justify-content: center;
}

.seat-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  color: #12324d;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 6px rgba(20, 60, 100, 0.15);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, outline 0.1s ease;
}

.seat-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px rgba(20, 60, 100, 0.2);
}

.seat-button:disabled {
  cursor: not-allowed;
}

.seat-button.seat--disabled {
  background: #dde4f0;
  color: #7a8ba1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.seat-button.seat--available {
  background: rgba(255, 255, 255, 0.88);
}

.seat-button.seat--locked {
  background: #ffd166;
  color: #6a3f00;
}

.seat-button.seat--held {
  background: #cbd3de;
  color: #3d4654;
}

.seat-button.seat--held.seat--priced {
  background: #cbd3de;
  color: #3d4654;
}

.seat-button.seat--sold {
  background: #ffffff;
  color: #4b5d70;
  box-shadow: inset 0 0 0 2px rgba(76, 114, 176, 0.25);
}

.seat-button.seat--priced {
  background: var(--seat-price-color);
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.seat-button.seat--locked.seat--priced {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)),
    var(--seat-price-color);
}

.seat-button.seat--sold.seat--priced {
  background: #ffffff;
}

.seat-button.seat--selected::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2px solid rgba(31, 118, 208, 0.8);
  pointer-events: none;
}

.seat-button[data-label]::before {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #143c64;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.seat-button[data-label]:hover::before {
  opacity: 1;
}

.placeholder {
  margin: 0;
  color: var(--color-text-muted);
}

.price-legend h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #1b2a3b;
}

.price-legend ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.price-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 0.5rem;
  background: var(--chip-color, #ccc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.mt-6 {
  margin-top: 6px;
}

.status--ok {
  color: var(--color-primary);
}

.status--error {
  color: var(--color-danger);
}

.status--muted {
  color: var(--color-text-muted);
}

.status-ok {
  color: var(--color-success);
}

.status-warn {
  color: var(--color-warning);
}

.status-error {
  color: var(--color-danger);
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: #f2f6fd;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.project-list__item--active {
  background: linear-gradient(135deg, rgba(31, 118, 208, 0.15), rgba(31, 118, 208, 0.1));
}

.project-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-list__name {
  font-size: 1rem;
}

.project-list__stats {
  font-size: 0.8rem;
  color: #637591;
}

.project-list__empty {
  text-align: center;
  padding: 1.8rem 1rem;
  color: #637591;
  background: rgba(31, 118, 208, 0.08);
  border-radius: 12px;
}

.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 20px 50px rgba(20, 60, 100, 0.25);
  width: min(420px, 90vw);
}

.modal--wide {
  width: min(1120px, 96vw);
  max-height: 92vh;
  overflow: hidden;
}

.modal--wide .modal__content {
  max-height: 92vh;
  overflow: auto;
}

.modal::backdrop {
  background: rgba(14, 28, 56, 0.35);
}

.modal__content {
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.panel--subtle {
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-top: 0.8rem;
}

.panel--subtle .panel__heading {
  padding: 0;
  border: none;
  margin-bottom: 0.6rem;
}

.panel--subtle .panel__actions {
  padding: 0;
  justify-content: flex-end;
}

.sales-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.5rem 1.75rem 2rem;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.sales-sidebar {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.sales-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.sales-main > * {
  flex-shrink: 0;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-section__title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: var(--color-bg-soft);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.nav-item:hover {
  border-color: #c9d7f1;
  color: var(--color-text);
}

.nav-item--active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 10px 20px rgba(31, 118, 208, 0.25);
}

.nav-item--active:hover,
.nav-item--active:focus-visible {
  background: #155fb0;
  color: #fff;
}

.ticketing-switch {
  display: inline-flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ticketing-switch .button.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.panel--module {
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(16, 44, 90, 0.06);
}

.project-picker {
  border: 1px dashed var(--color-border);
  background: var(--color-bg-soft);
  padding-block: 0.9rem;
}

.project-picker__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.project-picker select {
  min-width: 220px;
}

.module-sales-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.85fr);
  gap: 1rem;
  min-height: 0;
  align-items: start;
}

.module-sales-grid > * {
  min-width: 0;
  min-height: 0;
}

.module-sales-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
}

.module-sales-left > .panel--canvas {
  flex: 1;
}

.module-sales-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
}

.sticky-operator-panel {
  position: sticky;
  top: 0.75rem;
  z-index: 3;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-raised);
  padding: 1rem;
}

.operator-panel__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.operator-panel__heading h2,
.operator-panel__heading h3 {
  margin: 0;
}

.operator-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 800;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.seat-badge {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-block;
  background: #d4def1;
}

.seat-badge--idle {
  background: #cfe4ff;
}

.seat-badge--sold {
  background: #ffcf70;
}

.seat-badge--checked {
  background: #2ecc71;
}

.seat-badge--disabled {
  background: #e5e9f1;
}

.selected-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#selected-list,
#merch-cart-list {
  max-height: min(34vh, 320px);
  overflow: auto;
  padding-right: 0.15rem;
}

.selected-item {
  background: #f4f7ff;
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.selected-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.selected-item__actions {
  display: flex;
  gap: 0.5rem;
}

.selected-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.1rem 0;
  font-weight: 600;
  color: #1b2a3b;
}

.selected-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.selected-actions .button--primary,
#btn-submit-merch-order {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
}

.selected-actions .button--link {
  padding-left: 0;
}

.workspace-footer {
  margin-top: 1.2rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  min-height: 0;
}

.seat-table-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.input-search {
  display: flex;
  align-items: center;
  border: 1px solid #ccd6e5;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(22, 56, 94, 0.06);
}

.input-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  min-width: 220px;
  color: #1f2c3f;
}

.input-search input::placeholder {
  color: #7a8798;
}

.seat-table-wrapper,
.account-list-wrapper {
  overflow-x: auto;
}

.seat-table-wrapper {
  max-height: min(420px, 45vh);
  overflow-y: auto;
  min-height: 0;
}

.table--sticky-wrapper {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 44, 90, 0.08);
}

.table--sticky thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.seat-table,
.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.seat-table th,
.seat-table td,
.account-table th,
.account-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 0.4rem;
  text-align: left;
}

.seat-table tbody tr:hover,
.account-table tbody tr:hover {
  background: rgba(32, 99, 155, 0.05);
}

.seat-table select,
.seat-table input {
  width: 100%;
  padding: 0.35rem;
  font-size: 0.85rem;
  border: 1px solid #ccd6e5;
  border-radius: 6px;
}

.seat-table th:nth-child(4),
.seat-table td:nth-child(4) {
  min-width: 240px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
}

.seat-table th:nth-child(5),
.seat-table td:nth-child(5) {
  min-width: 140px;
  white-space: nowrap;
  text-align: left;
}

.seat-table th:nth-child(3),
.seat-table td:nth-child(3) {
  min-width: 120px;
  white-space: nowrap;
}

.seat-table td:last-child,
.seat-table th:last-child,
.account-table td:last-child,
.account-table th:last-child {
  text-align: right;
}

/* 移动端/小屏适配 */
@media (max-width: 900px) {
  .panel {
    padding: 1.2rem 1rem;
  }
  .account-manager-grid--ticket-coupons {
    grid-template-columns: 1fr;
  }
  .coupon-project-bar {
    grid-template-columns: 1fr;
  }
  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .workspace-actions,
  .seat-table-actions,
  .table-pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .table--sticky-wrapper,
  .seat-table-wrapper {
    overflow-x: auto;
  }
  .table--sticky {
    min-width: 720px;
  }
  .seat-table-wrapper::after,
  .table--sticky-wrapper::after {
    content: '左右滑动查看更多';
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #6d7a8d;
    padding: 0.25rem 0.35rem;
  }
}

@media (max-width: 640px) {
  .toolbar {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
  .panel__heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .seat-table-actions,
  .workspace-actions {
    width: 100%;
    justify-content: flex-start;
  }
  input[type='text'],
  input[type='number'],
  input[type='password'],
  select {
    font-size: 0.95rem;
  }
  .table--sticky {
    min-width: 600px;
    font-size: 0.9rem;
  }
  .coupon-project-bar {
    grid-template-columns: 1fr;
  }
  .form-long {
    padding: 0.75rem;
    background: #f7f9fc;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
  }
  .form-step {
    border-bottom: 1px solid #e4e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }
  details.foldable {
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    background: #fff;
  }
  details.foldable summary {
    cursor: pointer;
    font-weight: 600;
    outline: none;
  }
  details.foldable[open] {
    box-shadow: 0 6px 16px rgba(16, 44, 90, 0.08);
  }
}

/* --- Generic tables --- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(16, 44, 90, 0.06);
}

.table thead th {
  background: #f5f8ff;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2c3f;
  border-bottom: 1px solid #e2e8f5;
}

.table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #2b3b4f;
}

.table tbody tr:nth-child(even) {
  background: #f9fbff;
}

.table tbody tr:hover {
  background: #eef5ff;
}

.table tfoot td {
  padding: 12px 14px;
  font-weight: 700;
  background: #f7f9fc;
}

.table th:last-child,
.table td:last-child {
  text-align: right;
}

/* 小屏下表格体验：开启滑动并提供提示 */
@media (max-width: 960px) {
  .table,
  .seat-table,
  .account-table,
  .merch-orders-table {
    font-size: 0.8rem;
  }
  .table--sticky-wrapper,
  .seat-table-wrapper,
  .account-list-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table--sticky-wrapper::after,
  .seat-table-wrapper::after,
  .account-list-wrapper::after {
    content: '← 横向滑动查看更多列';
    position: sticky;
    right: 8px;
    bottom: 6px;
    display: inline-block;
    background: rgba(32, 99, 155, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
  }
}

.merch-grid {
  display: block;
  width: 100%;
}

.merch-form {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}

.merch-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.merch-list--sales {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.merch-card {
  border: 1px solid #e1e8f5;
  border-radius: 12px;
  padding: 0.75rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100%;
}

.merch-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #f2f4f8;
  display: block;
}

.merch-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.merch-orders-table {
  width: 100%;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.merch-order-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.merch-order-form textarea {
  min-height: 120px;
}

.panel--merch-shop {
  grid-column: 1 / -1;
}

.merch-shop-grid {
  display: grid;
  grid-template-columns: minmax(360px, 2fr) minmax(300px, 360px);
  gap: 1.2rem;
  align-items: start;
}

.merch-cart {
  border: 1px solid #e1e8f5;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.merch-cart #merch-cart-list {
  max-height: 220px;
  overflow-y: auto;
}

.merch-cart .selected-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed #d9e1f2;
}

.merch-cart .selected-list li:last-child {
  border-bottom: none;
}

.merch-cart__actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.merch-cart__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.merch-cart__btn--remove {
  width: auto;
  border-radius: 999px;
  padding: 0 0.75rem;
}

.merch-cart__qty {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  color: #1b2a3b;
}

.merch-cart__discount {
  display: block;
  font-size: 0.85rem;
  color: #6c7a96;
  margin-top: 0.25rem;
}

@media (max-width: 1024px) {
  .merch-grid,
  .merch-shop-grid {
    grid-template-columns: 1fr;
  }
}

.account-manager-grid {
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  gap: 1.2rem;
  align-items: start;
  min-height: 0;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f6f9ff;
  max-width: 320px;
  width: 100%;
}

.account-list-wrapper--full {
  max-height: min(460px, 55vh);
  overflow-y: auto;
  min-height: 0;
}

.tickets-container {
  display: grid;
  gap: 0.75rem;
}

.ticket-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.ticket-card img {
  max-width: 180px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.scan-area {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  min-height: 220px;
}

.scan-area video {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.scan-area--checkin video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 60, 100, 0.34);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.scan-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

.scan-help {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px dashed #cdd9ea;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scan-help__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scan-help__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scan-help__url {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  line-height: 1.3;
  overflow: auto;
}

.scan-help__url code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  user-select: all;
}

.scan-help__steps {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: #4b5d70;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.scan-help__hint {
  margin: 0;
}

.hidden {
  display: none !important;
}

.boarding-board {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #b9cce5;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-raised);
}

.boarding-board__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e4ebf5;
}

.boarding-board__gate {
  color: #24415f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.boarding-board__topline strong {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e8f7ee;
  color: var(--color-success);
  font-size: 0.9rem;
}

.boarding-board__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.boarding-metric {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid #e1e9f5;
  border-radius: 8px;
  background: #f8fbff;
  min-height: 112px;
}

.boarding-metric span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.boarding-metric strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--color-text);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.boarding-metric--total {
  border-color: #f2d189;
  background: #fffaf0;
}

.boarding-metric--total strong {
  color: #9a6400;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
}

.boarding-metric--checked {
  border-color: #b7e4c2;
  background: #ecfdf3;
}

.boarding-metric--checked strong {
  color: var(--color-success);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
}

.boarding-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.boarding-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  transition: width 0.2s ease;
}

.checkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.checkin-grid > * {
  min-width: 0;
  min-height: 0;
}

.checkin-map {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkin-result {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f2f4f8;
  font-weight: 600;
  font-size: 1rem;
  min-height: 58px;
}

.checkin-result--notice {
  background: #e8f3ff;
  color: var(--color-primary);
}

.checkin-result--success {
  background: #e8f7ee;
  color: var(--color-success);
}

.checkin-result--error {
  background: #ffecec;
  color: #c92a2a;
}

.seat-grid--checkin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  gap: 3px;
  border: 1px solid #dce4f2;
  border-radius: 10px;
  padding: 8px;
  background: #f8fbff;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: min(58vh, 560px);
  overflow: auto;
  align-content: start;
  overscroll-behavior: contain;
}

.seat-grid--checkin .seat-dot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  border: 1px solid #cfd8e6;
}

.seat-dot--checked {
  background: #2ecc71;
  border-color: #26b863;
}

.seat-dot--sold {
  background: #ffcf70;
  border-color: #e1b754;
}

.seat-dot--idle {
  background: #cfe4ff;
  border-color: #9fc5ff;
}

.seat-dot--disabled {
  background: #e5e9f1;
  border-color: #cfd8e6;
}

.checkin-admin-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.sales-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.sales-tab {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #f7f9fc;
  cursor: pointer;
  min-width: 108px;
  text-align: center;
  transition: all 0.2s ease;
}

.sales-tab--active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 10px 20px rgba(31, 118, 208, 0.25);
}

.legend--checkin {
  margin-top: 0.5rem;
  gap: 0.5rem 0.75rem;
}

@media (max-width: 1200px) {
  .admin-container {
    padding: 1.25rem 1.25rem 1.75rem;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-sidebar {
    min-height: auto;
    max-height: min(42vh, 360px);
  }

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

  .console-panel[data-console-panel='seats'] > .panel--workspace {
    min-height: auto;
    overflow: visible;
  }

  .workspace-actions {
    flex-wrap: wrap;
  }

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

@media (max-width: 1024px) {
  .sales-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sales-sidebar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    max-height: min(40vh, 320px);
  }

  .nav-section {
    min-width: 0;
  }

  .nav-item {
    width: 100%;
  }

  .checkin-grid {
    grid-template-columns: 1fr;
  }

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

  .checkin-admin-grid {
    grid-template-columns: 1fr;
  }

  .sales-tabs {
    justify-content: center;
  }

  .module-sales-grid {
    grid-template-columns: 1fr;
  }

  .sticky-operator-panel {
    position: static;
  }

  .project-picker__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-picker select,
  .project-picker button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
  }

  .toolbar__group:last-child {
    margin-left: auto;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .seat-canvas {
    padding: 2.2rem 1rem 1rem;
  }

  .boarding-board__topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .boarding-metric--total strong,
  .boarding-metric--checked strong {
    font-size: 2.4rem;
  }

  .admin-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .admin-tab {
    width: 100%;
  }

  .account-form {
    padding: 1rem;
  }

  .seat-table-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.6rem;
    margin-left: 0;
  }

  .input-search {
    flex: 1 1 100%;
  }

  .input-search input {
    width: 100%;
    min-width: 0;
  }

  .seat-button {
    width: 30px;
    height: 30px;
  }
}
.auto-select {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.auto-select label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #51617a;
}

.auto-select select {
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccd6e5;
  border-radius: 6px;
  font-size: 0.95rem;
}
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  min-width: 140px;
  z-index: 10;
}

.dropdown__menu .button {
  width: 100%;
  justify-content: flex-start;
  margin: 2px 0;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 4px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.page--cli-wiki {
  background: var(--color-bg-page);
}

.cli-wiki-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  line-height: 1.6;
}

.page--cli-wiki code {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.page--cli-wiki pre {
  background: var(--cli-surface);
  color: var(--cli-text);
  border: 1px solid var(--cli-border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.page--cli-wiki h1,
.page--cli-wiki h2,
.page--cli-wiki h3 {
  color: var(--color-text);
}

.cli-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--cli-bg);
  color: var(--cli-text);
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.cli-shell {
  width: min(980px, 100%);
  background: var(--cli-surface);
  border: 1px solid var(--cli-border);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 80vh;
}

.cli-header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--cli-surface);
  border-bottom: 1px solid var(--cli-border);
  color: #9ca7b6;
}

.cli-header-bar a {
  color: #9ca7b6;
  text-decoration: none;
}

.cli-header-bar a:hover {
  color: var(--cli-text);
}

.cli-terminal {
  display: flex;
  flex-direction: column;
  background: var(--cli-bg);
  color: var(--cli-text);
  padding: 0.75rem 0.75rem 0.5rem;
  gap: 0.4rem;
  overflow: hidden;
}

.cli-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.55;
  padding-right: 0.35rem;
}

.cli-line {
  margin: 0.08rem 0;
}

.cli-line.info {
  color: var(--cli-text);
}

.cli-line.error {
  color: var(--color-danger);
}

.cli-line.success {
  color: #34d399;
}

.cli-line.warn {
  color: #facc15;
}

.cli-quick-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.cli-quick-actions button {
  background: #1b2433;
  border: 1px solid #2d3a52;
  color: #d2dceb;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

.cli-quick-actions button:hover {
  background: #253247;
}

.cli-input {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--cli-border);
  background: var(--cli-bg);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.cli-prompt {
  color: var(--cli-accent);
  min-width: 64px;
}

.cli-command {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--cli-text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.25rem 0.1rem;
}

.cli-command:focus {
  outline: none;
}

.cli-command::placeholder {
  color: #596679;
}

.cli-header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 640px) {
  .cli-shell {
    min-height: 70vh;
  }

  .cli-prompt {
    min-width: 48px;
  }
}
