:root {
  color-scheme: dark;
  --color-bg-primary: #121418;
  --color-bg-warm: #17160F;
  --color-bg-secondary: #171A1F;
  --color-bg-tertiary: #20242A;
  --color-bg-elevated: #282D34;
  --color-gold-primary: #C9A84C;
  --color-gold-light: #E2C47A;
  --color-gold-muted: #8A6F35;
  --color-gold-glow: rgba(201, 168, 76, 0.12);
  --color-neutral-100: #F5F0E8;
  --color-neutral-200: #D4CCBE;
  --color-neutral-400: #7A7368;
  --color-neutral-600: #3D3830;
  --color-neutral-700: #2A2520;
  --color-success: #4A7C59;
  --color-warning: #9A6A2F;
  --color-danger: #8B3A3A;
  --color-info: #3A5A7C;
  --color-success-soft: rgba(74, 124, 89, 0.15);
  --color-success-line: rgba(74, 124, 89, 0.4);
  --color-success-text: #6DBF82;
  --color-warning-soft: rgba(154, 106, 47, 0.16);
  --color-warning-line: rgba(154, 106, 47, 0.42);
  --color-warning-text: #E0B46F;
  --color-danger-soft: rgba(139, 58, 58, 0.15);
  --color-danger-line: rgba(139, 58, 58, 0.4);
  --color-danger-text: #D97777;
  --color-info-soft: rgba(58, 90, 124, 0.15);
  --color-info-line: rgba(58, 90, 124, 0.38);
  --color-info-text: #7FA4CF;
  --color-white: #FFFFFF;
  --admin-gold: #C4A35A;

  --font-primary: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: clamp(12px, 1.8vw, 12px);
  --text-sm: clamp(12px, 2vw, 14px);
  --text-base: clamp(13px, 2.2vw, 16px);
  --text-md: clamp(14px, 2.4vw, 18px);
  --text-lg: clamp(16px, 2.8vw, 20px);
  --text-xl: clamp(18px, 3.5vw, 24px);
  --text-2xl: clamp(22px, 4.5vw, 32px);
  --text-3xl: clamp(26px, 5.5vw, 42px);
  --text-4xl: clamp(30px, 7vw, 56px);

  --space-1: clamp(4px, 0.8vw, 6px);
  --space-2: clamp(6px, 1vw, 8px);
  --space-3: clamp(8px, 1.5vw, 12px);
  --space-4: clamp(12px, 2vw, 16px);
  --space-5: clamp(16px, 2.5vw, 20px);
  --space-6: clamp(20px, 3vw, 24px);
  --space-8: clamp(24px, 4vw, 32px);
  --space-10: clamp(32px, 5vw, 48px);
  --space-12: clamp(40px, 6vw, 64px);

  --radius-sm: clamp(4px, 0.8vw, 6px);
  --radius-md: clamp(8px, 1.2vw, 10px);
  --radius-lg: clamp(12px, 1.8vw, 16px);
  --radius-xl: clamp(16px, 2.5vw, 24px);
  --radius-full: 9999px;

  --container-sm: 540px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-medium: 300ms;
  --duration-slow: 450ms;
  --duration-slower: 600ms;

  --icon-xs: clamp(12px, 2vw, 14px);
  --icon-sm: clamp(14px, 2.5vw, 16px);
  --icon-md: clamp(16px, 3vw, 20px);
  --icon-lg: clamp(20px, 3.5vw, 24px);
  --icon-xl: clamp(24px, 4vw, 32px);

  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  --bg: var(--color-bg-primary);
  --paper: var(--color-bg-secondary);
  --ink: var(--color-neutral-100);
  --muted: var(--color-neutral-200);
  --line: var(--color-neutral-700);
  --red: var(--color-gold-primary);
  --red-strong: var(--color-gold-light);
  --black: var(--color-bg-primary);
  --soft-red: var(--color-gold-glow);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.28);
  --radius: var(--radius-lg);
}

/* Production responsiveness and accessibility overrides. */
:root {
  --color-bg-primary: #141210;
  --text-xs: clamp(10px, 1.8vw, 12px);
  --text-sm: clamp(12px, 2vw, 14px);
  --text-base: clamp(13px, 2.2vw, 16px);
  --text-lg: clamp(16px, 2.8vw, 20px);
  --text-xl: clamp(18px, 3.5vw, 24px);
  --text-2xl: clamp(22px, 4.5vw, 32px);
  --text-3xl: clamp(26px, 5.5vw, 42px);
  --space-4: clamp(12px, 2vw, 16px);
  --space-6: clamp(20px, 3vw, 24px);
  --space-8: clamp(24px, 4vw, 32px);
  --space-10: clamp(32px, 5vw, 48px);
}

html,
body {
  min-width: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 0, var(--color-gold-glow), transparent 30rem),
    linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-warm) 48%, var(--color-bg-primary) 100%);
  animation: fadeIn var(--duration-medium) var(--ease-standard);
}

.portal,
.app-shell,
.workspace,
.workspace-content,
.panel,
.metric-card,
.customer-card,
.wallet-card,
.staff-row,
.report-panel,
.chart-side-card {
  min-width: 0;
  max-width: 100%;
}

.panel,
.metric-card,
.customer-card,
.wallet-card,
.staff-row,
.report-panel,
.chart-side-card,
.modal,
.bottom-sheet {
  overflow: hidden;
}

button,
a,
input,
select,
textarea,
.side-tab,
.nav-item,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
  font-size: max(12px, var(--text-sm));
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.side-tab:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.reward-btn:hover,
.side-tab:hover,
a:hover {
  filter: brightness(1.04);
}

button:active,
.primary-btn:active,
.secondary-btn:active,
.reward-btn:active,
.side-tab:active,
a:active {
  transform: translateY(0) scale(0.98);
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.password-strength {
  --strength: 0%;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.password-strength[hidden] {
  display: none;
}

.password-strength span {
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
}

.password-strength span::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--strength);
  border-radius: inherit;
  background: var(--color-danger-text);
  transition: width var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}

.password-strength.good span::after {
  background: var(--color-warning-text);
}

.password-strength.strong span::after {
  background: var(--color-success-text);
}

.skeleton {
  background: linear-gradient(90deg, var(--color-bg-tertiary) 25%, var(--color-gold-glow) 50%, var(--color-bg-tertiary) 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s infinite linear;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--color-neutral-600);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-muted);
}

body[data-theme="light"] {
  --color-bg-primary: #F5EFE4;
  --color-bg-secondary: #FEFCF6;
  --color-bg-tertiary: #DACCB0;
  --color-bg-elevated: #FEFCF6;
  --color-nav-bg: #E8DEC8;
  --color-neutral-100: #1E1508;
  --color-neutral-200: #7A6040;
  --color-neutral-400: #B8A888;
  --color-neutral-600: #A89878;
  --color-neutral-700: #C8B890;
  --color-gold-tint: #FDF3D0;
  --color-gold-primary: #C9A84C;
  --color-gold-muted: #A07830;
  --color-gold-deep: #A07830;
  --color-gold-dark: #7A5A1E;
  --color-gold-light: #E8C870;
  --color-gold-ink: #2A1E08;
  --color-success-soft: #EEF5EE;
  --color-success-text: #2A5E2A;
  --color-success-line: #A8D4A8;
  --color-warning-soft: #FEF3E0;
  --color-warning-text: #8A5800;
  --color-warning-line: #E8C870;
  --color-danger-soft: #FAEEEE;
  --color-danger-text: #842020;
  --color-danger-line: #D4A0A0;
  --color-info-soft: #EEF2FA;
  --color-info-text: #1A407A;
  --color-info-line: #A0B4D8;
  --bg: var(--color-bg-primary);
  --paper: var(--color-bg-secondary);
  --ink: var(--color-neutral-100);
  --muted: var(--color-neutral-200);
  --line: var(--color-neutral-700);
}

body[data-theme="light"] .side-panel {
  background: var(--color-nav-bg);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-100);
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: var(--color-neutral-400);
}

@media (max-width: 767px) {
  body {
    padding-bottom: 56px;
  }

  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    padding-right: 16px;
    padding-bottom: calc(56px + var(--space-6));
    padding-left: 16px;
  }

  .workspace-content {
    margin-left: 0;
    padding-bottom: 56px;
  }

  .workspace > .menu-btn {
    display: none;
  }

  .side-panel {
    position: fixed;
    inset: auto 0 0 0;
    z-index: var(--z-sticky);
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    transform: none;
    background: var(--color-bg-secondary);
  }

  .side-panel > div,
  .side-panel > .secondary-btn {
    display: none;
  }

  .side-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: 56px;
    gap: 0;
  }

  .side-tab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 56px;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: 0;
    font-size: var(--text-xs);
    line-height: 1.1;
    text-align: center;
  }

  .side-tab::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    background: currentColor;
    opacity: 0.78;
    mask: radial-gradient(circle at 50% 50%, #000 45%, transparent 47%);
  }

  .auth-layout,
  .pass-layout,
  .admin-grid,
  .dashboard-grid,
  .staff-layout,
  .settings-layout,
  .report-grid,
  .onboarding-layout,
  .button-row,
  .inline-form,
  .filter-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  label,
  input,
  select,
  textarea,
  .primary-btn,
  .secondary-btn,
  .apple-wallet-btn,
  .reward-btn {
    width: 100%;
  }

  .modal,
  [role="dialog"] {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: slideUp var(--duration-slow) var(--ease-standard);
  }
}

body[data-theme="light"] {
  --color-bg-primary: #F5EFE4;
  --color-bg-secondary: #FEFCF6;
  --color-bg-tertiary: #DACCB0;
  --color-bg-elevated: #FEFCF6;
  --color-nav-bg: #E8DEC8;
  --color-neutral-100: #1E1508;
  --color-neutral-200: #7A6040;
  --color-neutral-400: #B8A888;
  --color-neutral-600: #A89878;
  --color-neutral-700: #C8B890;
  --color-gold-tint: #FDF3D0;
  --color-gold-primary: #C9A84C;
  --color-gold-muted: #A07830;
  --color-gold-deep: #A07830;
  --color-gold-dark: #7A5A1E;
  --color-gold-light: #E8C870;
  --color-gold-ink: #2A1E08;
  --color-success-soft: #EEF5EE;
  --color-success-text: #2A5E2A;
  --color-success-line: #A8D4A8;
  --color-warning-soft: #FEF3E0;
  --color-warning-text: #8A5800;
  --color-warning-line: #E8C870;
  --color-danger-soft: #FAEEEE;
  --color-danger-text: #842020;
  --color-danger-line: #D4A0A0;
  --color-info-soft: #EEF2FA;
  --color-info-text: #1A407A;
  --color-info-line: #A0B4D8;
  --bg: var(--color-bg-primary);
  --paper: var(--color-bg-secondary);
  --ink: var(--color-neutral-100);
  --muted: var(--color-neutral-200);
  --line: var(--color-neutral-700);
}

body[data-theme="light"] .side-panel {
  background: var(--color-nav-bg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

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

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 0, rgba(201, 168, 76, 0.12), transparent 30rem),
    radial-gradient(circle at 94% 12%, rgba(226, 196, 122, 0.07), transparent 28rem),
    linear-gradient(135deg, #121418 0%, #17160F 48%, #121418 100%);
  color: var(--ink);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.theme-toggle {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-toast);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-full);
  background: rgba(23, 26, 31, 0.86);
  color: var(--color-gold-light);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.theme-toggle span::before {
  content: "☾";
  font-size: var(--icon-md);
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--color-gold-primary);
  background: var(--color-bg-elevated);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.98);
}

.inline-link-btn {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-gold-light);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
}

.inline-link-btn:hover {
  color: var(--color-gold-primary);
}

.is-busy {
  opacity: 0.78;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.2vw, 2.1rem);
  line-height: 1;
}

h2 {
  max-width: 660px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.app-shell {
  min-height: 100dvh;
}

.portal {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

#staffApp:has(.workspace:not(.hidden)),
#adminApp:has(.workspace:not(.hidden)) {
  width: min(1560px, calc(100% - 48px));
}

.hidden {
  display: none !important;
}

.site-header,
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.compact-top h2,
.section-heading h2,
.side-panel h2 {
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.as-link {
  text-decoration: none;
}

.auth-layout,
.pass-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.admin-auth {
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
}

.auth-stack,
.dashboard,
.stack-form,
.customer-list,
.activity-list,
.staff-list,
.checklist,
.report-list {
  display: grid;
}

.auth-stack,
.dashboard {
  gap: 16px;
}

.stack-form {
  gap: 15px;
}

.intro-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.04), rgba(17, 17, 17, 0.86)),
    url("https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.intro-panel .eyebrow {
  color: #ffffff;
}

.intro-panel p {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}

.panel,
.wallet-card,
.customer-card,
.metric-card,
.staff-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.check-label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.4;
}

.check-label span {
  min-width: 0;
}

.privacy-copy {
  white-space: nowrap;
}

.check-label input {
  width: 18px;
  min-height: 18px;
  margin-top: 0;
  accent-color: var(--red);
}

.check-label a {
  color: var(--red);
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

input {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 13px;
  font: inherit;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--red);
  outline: 3px solid rgba(201, 50, 52, 0.15);
}

.primary-btn,
.secondary-btn,
.reward-btn,
.menu-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 850;
  line-height: 1;
}

.primary-btn {
  border: 0;
  background: var(--red);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--red-strong);
}

.secondary-btn,
.menu-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-btn:hover,
.menu-btn:hover {
  border-color: var(--black);
}

.reward-btn {
  border: 0;
  background: var(--black);
  color: #ffffff;
}

.help-text,
.muted-copy,
.result-text {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pass-layout {
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
}

.wallet-card {
  width: 100%;
  max-width: 430px;
  overflow: hidden;
  background: var(--black);
  color: #ffffff;
  padding: 24px;
  justify-self: start;
}

.wallet-top,
.pass-footer,
.customer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.wallet-top span,
.customer-row span,
.pass-footer span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-xs);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet-top strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 1.1;
}

.brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--red);
  font-size: 1.3rem;
  font-weight: 950;
}

.customer-row {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.punch-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.punch-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.punch-grid span.punched {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--red);
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
}

.qr-box img {
  display: block;
  width: min(100%, 246px);
  aspect-ratio: 1;
}

.pass-footer {
  margin-top: 18px;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 24px;
  min-height: calc(100dvh - 56px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 241, 0.72)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-panel h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.2vw, 2.3rem);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.side-tab {
  min-height: 42px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 850;
  text-align: left;
}

.side-tab.active,
.side-tab:hover {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.workspace-content {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.promotion-panel {
  margin-bottom: 16px;
}

.audience-toggle,
.eligibility-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.audience-toggle legend,
.eligibility-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
}

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

.audience-toggle .radio-options {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.compact-choice {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.compact-choice legend {
  float: left;
  padding-top: 2px;
}

.compact-choice .radio-options {
  display: flex;
  justify-content: flex-end;
}

.radio-options label {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  line-height: 1.2;
}

.compact-choice .radio-options label,
.audience-toggle .radio-options label {
  min-height: 32px;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 750;
}

.radio-options input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
}

.radio-options input,
.check-label input,
input[type="radio"],
input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
}

.radio-options span {
  min-width: 0;
  color: inherit;
}

.audience-toggle input,
.eligibility-group input {
  accent-color: var(--red);
}

.workspace-section {
  display: none;
}

.active-workspace-section {
  display: block;
}

.menu-btn {
  display: none;
  margin-bottom: 12px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(201, 50, 52, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(201, 50, 52, 0.13), rgba(255, 255, 255, 0.9)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.filter-controls {
  display: inline-flex;
  gap: 10px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(20, 20, 20, 0.08);
}

.filter-controls label,
.activity-panel .list-heading label {
  min-width: 150px;
  display: grid;
  gap: 5px;
  padding: 7px 8px 8px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(248, 248, 248, 0.86);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0;
  color: var(--muted);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.filter-controls label:hover,
.activity-panel .list-heading label:hover,
.filter-controls label:focus-within,
.activity-panel .list-heading label:focus-within {
  transform: translateY(-1px);
  border-color: rgba(201, 50, 52, 0.32);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(201, 50, 52, 0.11);
}

.filter-controls select,
.activity-panel select {
  appearance: none;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, transparent 50%, var(--red) 50%) right 16px top 17px / 7px 7px no-repeat,
    linear-gradient(135deg, var(--red) 50%, transparent 50%) right 11px top 17px / 7px 7px no-repeat,
    #ffffff;
  color: var(--ink);
  padding: 0 34px 0 12px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.filter-controls select:focus,
.activity-panel select:focus {
  outline: 0;
  border-color: rgba(201, 50, 52, 0.65);
  box-shadow: 0 0 0 4px rgba(201, 50, 52, 0.13);
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  min-height: 118px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 241, 0.55)),
    #ffffff;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 50, 52, 0.42);
  box-shadow: var(--shadow);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.metric-card strong {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.metric-card small {
  color: var(--muted);
  font-weight: 750;
}

.top-customers-card {
  align-content: start;
  max-height: 190px;
}

.top-customers-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  max-height: 126px;
}

.top-customers-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.top-customers-list li > span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: var(--text-xs);
}

.top-customers-list strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-customers-list small {
  display: block;
  font-size: var(--text-xs);
}

.top-customers-list .empty-row {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

body:not([data-theme="light"]) .top-customers-list li {
  background: rgba(255, 255, 255, 0.04);
}

body:not([data-theme="light"]) .audience-toggle,
body:not([data-theme="light"]) .eligibility-group {
  background: var(--color-bg-tertiary);
}

@media (max-width: 480px) {
  .audience-toggle .radio-options {
    grid-template-columns: 1fr;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  gap: 16px;
}

.dashboard-report-section {
  margin-top: 38px;
}

.dashboard-report-section .section-heading h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
}

.chart-panel {
  min-height: 520px;
}

.chart-panel > .panel-heading h3 {
  font-size: clamp(1.55rem, 2.3vw, 2.25rem);
}

.chart-side-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.chart-side-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 520px;
  max-height: 520px;
  overflow: hidden;
}

.chart-side-card .eyebrow {
  margin-bottom: 0;
}

.bar-list {
  display: grid;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 10px;
}

.vertical-bars {
  min-height: 300px;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  align-items: end;
}

.vertical-bars.compact-bars {
  grid-template-columns: repeat(10, minmax(34px, 1fr));
}

.vertical-bars.mini-bars {
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
}

.bar-column {
  min-height: 300px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  align-items: end;
  text-align: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.bar-column span,
.bar-column strong {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.bar-column div {
  width: 100%;
  height: 230px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 2px;
  background: var(--soft-red);
}

.compact-bars .bar-column div {
  height: 170px;
}

.mini-bars .bar-column div {
  height: 140px;
}

.bar-column i {
  display: block;
  width: 100%;
  height: 0;
  border-radius: 0;
  background: var(--red);
}

.bar-column.active div {
  outline: 3px solid rgba(201, 50, 52, 0.18);
  outline-offset: 3px;
}

.chart-details {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  align-content: start;
  gap: 8px;
}

.chart-details p {
  margin-bottom: 0;
  padding: 0 12px 12px;
  color: var(--muted);
}

.customer-insight-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.customer-insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.customer-insight-row span {
  display: grid;
  gap: 5px;
  color: var(--black);
  font-weight: 850;
}

.customer-insight-row small,
.customer-insight-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.customer-insight-row small {
  font-size: 0.86rem;
}

.customer-insight-row em {
  min-width: 68px;
  text-align: right;
  font-size: 0.9rem;
}

.bar-column .bar-h-0 { height: 0; }
.bar-column .bar-h-10 { height: 10%; }
.bar-column .bar-h-20 { height: 20%; }
.bar-column .bar-h-30 { height: 30%; }
.bar-column .bar-h-40 { height: 40%; }
.bar-column .bar-h-50 { height: 50%; }
.bar-column .bar-h-60 { height: 60%; }
.bar-column .bar-h-70 { height: 70%; }
.bar-column .bar-h-80 { height: 80%; }
.bar-column .bar-h-90 { height: 90%; }
.bar-column .bar-h-100 { height: 100%; }

.scanner-box {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(201, 50, 52, 0.12), transparent 12rem),
    #101814;
}

#scannerVideo {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.scan-frame {
  position: absolute;
  width: min(70%, 260px);
  aspect-ratio: 1;
  border: 3px solid #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.34);
}

.button-row,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.staff-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staff-metrics article {
  display: grid;
  gap: 8px;
  padding: 17px;
  border: 1px solid rgba(201, 50, 52, 0.18);
  border-radius: var(--radius);
  background: var(--soft-red);
}

.staff-metrics span,
.customer-stats span,
.staff-row span {
  color: var(--muted);
  font-weight: 850;
}

.staff-metrics strong {
  font-size: 1.45rem;
}

.panel-heading {
  display: grid;
  grid-template-columns: auto minmax(220px, 340px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.list-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3vw, 3rem);
}

.customer-list,
.activity-list,
.staff-list,
.checklist,
.report-list {
  gap: 12px;
}

.onboarding-layout,
.report-grid {
  display: grid;
  gap: 16px;
}

.onboarding-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: start;
}

.launch-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.96), rgba(201, 50, 52, 0.9)),
    var(--black);
  color: #ffffff;
}

.launch-panel .eyebrow,
.launch-panel .muted-copy {
  color: rgba(255, 255, 255, 0.76);
}

.launch-panel.launch-ready {
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.96), rgba(34, 139, 82, 0.94)),
    var(--black);
}

.readiness-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 10px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.readiness-ring strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.readiness-ring span {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 850;
}

.check-item,
.report-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.check-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-red);
  color: var(--red);
  font-weight: 950;
}

.check-item.complete .check-mark {
  background: var(--red);
  color: #ffffff;
}

.check-item strong,
.report-row strong {
  display: block;
  margin-bottom: 4px;
}

.check-item span,
.report-row span,
.report-row small {
  color: var(--muted);
  font-size: 0.9rem;
}

.check-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

.report-panel:first-child {
  grid-column: 1 / -1;
}

.report-metrics {
  margin-bottom: 0;
}

.report-row.warning {
  border-color: rgba(201, 50, 52, 0.34);
  background: linear-gradient(90deg, rgba(201, 50, 52, 0.1), rgba(255, 255, 255, 0.78));
}

.report-score {
  color: var(--black);
  font-weight: 950;
  text-align: right;
}

.customer-card,
.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.customer-card:hover {
  border-color: var(--red);
}

.customer-card h3 {
  margin-bottom: 6px;
}

.customer-card p {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.customer-stats {
  display: grid;
  gap: 4px;
  text-align: right;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.activity-row.needs-review {
  padding: 14px;
  border: 1px solid rgba(201, 50, 52, 0.36);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(201, 50, 52, 0.12), rgba(255, 255, 255, 0.72));
}

.activity-row.needs-review strong {
  color: var(--red);
}

.activity-row.is-selectable {
  cursor: pointer;
}

.activity-row.is-selectable:hover {
  background: rgba(201, 50, 52, 0.05);
}

.activity-row.selected-row {
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: rgba(201, 50, 52, 0.08);
  padding: 14px;
}

.activity-panel .compact-section-heading {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row div,
.activity-row span {
  display: grid;
  gap: 4px;
}

.activity-row span,
.activity-row time {
  color: var(--muted);
  font-size: 0.9rem;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.55fr);
  gap: 16px;
  align-items: start;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.55fr);
  gap: 16px;
  align-items: start;
}

.settings-layout .staff-form-panel {
  grid-column: 1;
  grid-row: 1;
  position: static;
}

.settings-layout > section {
  grid-column: 1;
}

#adminPasswordForm {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.staff-form-panel {
  position: sticky;
  top: 24px;
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-heading .secondary-btn {
  min-height: 36px;
}

.staff-row {
  padding: 18px;
}

.staff-row div {
  display: grid;
  gap: 6px;
}

.staff-row small {
  color: var(--muted);
  font-weight: 750;
  text-transform: capitalize;
}

.empty,
.app-error {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
}

.legal-panel {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 28px;
}

.legal-panel h2 {
  margin-bottom: 4px;
}

.legal-panel h3 {
  margin-top: 10px;
}

.legal-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.app-error {
  margin: 16px;
  color: var(--red);
}

@media (max-width: 980px) {
  .auth-layout,
  .pass-layout,
  .admin-grid,
  .auth-stack {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 390px;
  }

  .pass-layout {
    max-width: 620px;
  }

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

  .dashboard-hero,
  .dashboard-grid,
  .staff-layout,
  .settings-layout,
  .onboarding-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    display: grid;
    align-items: start;
  }

  .chart-side-card {
    min-height: 360px;
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, #ffffff 0, #fbf5f5 180px, var(--bg) 520px),
      var(--bg);
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.04;
  }

  .portal {
    width: min(100% - 16px, 1160px);
    padding: 14px 0 32px;
  }

  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    width: min(100% - 16px, 1160px);
  }

  .workspace {
    display: block;
  }

  .workspace-content {
    gap: 16px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .side-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(86vw, 300px);
    min-height: 100dvh;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    overflow-y: auto;
  }

  .workspace.menu-open .side-panel {
    transform: translateX(0);
  }
}

@media (max-width: 560px) {
  .portal {
    width: min(100% - 12px, 1160px);
    padding-top: 10px;
  }

  .site-header,
  .dashboard-top,
  .customer-card,
  .staff-row,
  .activity-row,
  .panel-heading,
  .list-heading,
  .inline-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-header,
  .dashboard-top {
    display: grid;
  }

  .dashboard-hero {
    padding: 14px;
    gap: 12px;
  }

  .dashboard-hero h2,
  h2 {
    font-size: 1.9rem;
  }

  .compact-top h2,
  .section-heading h2,
  .side-panel h2 {
    font-size: 1.65rem;
  }

  .intro-panel,
  .panel,
  .wallet-card {
    padding: 14px;
  }

  .intro-panel {
    min-height: 260px;
  }

  .intro-panel p {
    font-size: 0.95rem;
  }

  .site-header,
  .dashboard-top {
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .auth-layout,
  .pass-layout,
  .admin-grid,
  .workspace-content,
  .auth-stack,
  .dashboard {
    gap: 12px;
  }

  .stack-form {
    gap: 12px;
  }

  input {
    min-height: 44px;
  }

  .primary-btn,
  .secondary-btn,
  .reward-btn,
  .menu-btn {
    min-height: 42px;
  }

  .button-row > *,
  .primary-btn,
  .secondary-btn,
  .reward-btn {
    width: 100%;
  }

  .analytics-grid,
  .staff-metrics,
  .dashboard-grid,
  .staff-layout,
  .settings-layout,
  .onboarding-layout,
  .report-grid,
  .launch-panel,
  .check-item,
  .report-row {
    grid-template-columns: 1fr;
  }

  .readiness-ring {
    width: 116px;
    height: 116px;
  }

  .settings-layout .staff-form-panel {
    grid-column: auto;
  }

  #adminPasswordForm,
  .settings-layout > section {
    grid-column: auto;
    grid-row: auto;
  }

  .filter-controls {
    width: 100%;
    display: grid;
  }

  .filter-controls label,
  .activity-panel .list-heading label {
    min-width: 0;
  }

  .customer-stats {
    text-align: left;
  }

  .punch-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 18px 0;
  }

  #customerDashboard {
    gap: 10px;
  }

  #customerDashboard .pass-layout {
    max-width: 390px;
    margin: 0 auto;
    gap: 10px;
  }

  #customerDashboard .wallet-card {
    max-width: 390px;
    justify-self: center;
    padding: 14px;
  }

  #customerDashboard .wallet-top,
  #customerDashboard .pass-footer,
  #customerDashboard .customer-row {
    gap: 10px;
  }

  #customerDashboard .wallet-top strong {
    margin-top: 4px;
    font-size: 1.18rem;
  }

  #customerDashboard .wallet-top span,
  #customerDashboard .customer-row span,
  #customerDashboard .pass-footer span {
    font-size: var(--text-xs);
  }

  #customerDashboard .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  #customerDashboard .customer-row {
    margin-top: 16px;
    padding-top: 12px;
  }

  #customerDashboard .customer-row strong,
  #customerDashboard .pass-footer strong {
    font-size: 0.95rem;
  }

  #customerDashboard .punch-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin: 16px 0;
  }

  #customerDashboard .punch-grid span {
    border-radius: 6px;
    font-size: 0.82rem;
  }

  #customerDashboard .qr-box {
    width: min(68vw, 210px);
    margin: 0 auto;
    padding: 10px;
  }

  #customerDashboard .qr-box img {
    width: min(100%, 190px);
  }

  #customerDashboard .pass-footer {
    margin-top: 14px;
  }

  #customerDashboard .stack-form {
    max-width: 390px;
    margin: 0 auto;
  }

  .vertical-bars,
  .vertical-bars.compact-bars,
  .vertical-bars.mini-bars {
    min-width: 560px;
  }

  .bar-column {
    min-height: 240px;
  }

  .bar-column div {
    height: 180px;
  }

  .chart-panel {
    min-height: auto;
  }

  .chart-side-card {
    min-height: 320px;
    max-height: 320px;
  }

  .privacy-copy {
    font-size: clamp(0.78rem, 3.4vw, 0.9rem);
  }
}

@media (max-width: 380px) {
  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    width: min(100% - 8px, 1160px);
  }

  .intro-panel,
  .panel,
  .wallet-card {
    padding: 12px;
  }

  .dashboard-hero h2,
  h2 {
    font-size: 1.7rem;
  }

  .analytics-grid,
  .staff-metrics {
    gap: 8px;
  }

  .metric-card,
  .staff-metrics article,
  .customer-card,
  .staff-row {
    padding: 12px;
  }

  #customerDashboard .pass-layout {
    max-width: 340px;
  }

  #customerDashboard .wallet-card,
  #customerDashboard .stack-form {
    max-width: 340px;
  }

  #customerDashboard .qr-box {
    width: min(70vw, 176px);
  }

  #customerDashboard .qr-box img {
    width: min(100%, 158px);
  }

  #customerDashboard .punch-grid {
    gap: 6px;
    margin: 14px 0;
  }
}

/* SaaS black/gold design system override */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-6);
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-5);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
  50% { box-shadow: 0 0 0 6px rgba(201, 168, 76, 0.2); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-neutral-600);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-muted);
}

h1,
h2,
h3,
h4 {
  color: var(--color-neutral-100);
  letter-spacing: 0.02em;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: 1.3;
}

h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-family: var(--font-primary);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.4;
}

p,
li {
  font-size: var(--text-base);
  line-height: 1.6;
}

label {
  gap: var(--space-2);
  color: var(--color-neutral-200);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
}

.app-shell {
  display: flex;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--color-bg-primary);
}

.portal {
  width: 100%;
  max-width: var(--container-2xl);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-8) clamp(16px, 4vw, 48px) var(--space-12);
  animation: fadeIn var(--duration-medium) var(--ease-enter);
}

#staffApp:has(.workspace:not(.hidden)),
#adminApp:has(.workspace:not(.hidden)) {
  width: 100%;
  max-width: var(--container-2xl);
}

.site-header,
.dashboard-top {
  min-height: clamp(52px, 7vw, 64px);
  margin-bottom: var(--space-6);
  padding: 0 0 var(--space-5);
  border-bottom: 1px solid var(--color-neutral-700);
}

.eyebrow {
  color: var(--color-gold-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.panel,
.wallet-card,
.customer-card,
.metric-card,
.staff-row,
.chart-side-card,
.launch-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-soft);
  transition:
    border-color var(--duration-base) var(--ease-standard),
    transform var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard);
}

.panel::before,
.metric-card::before,
.wallet-card::before,
.launch-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-primary), transparent);
  opacity: 0.62;
}

.panel:hover,
.wallet-card:hover,
.customer-card:hover,
.metric-card:hover,
.staff-row:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold-muted);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(16px, 3vw, 28px);
}

.auth-layout,
.pass-layout,
.admin-grid,
.onboarding-layout,
.report-grid,
.dashboard-grid,
.staff-layout,
.settings-layout {
  gap: var(--space-6);
}

.auth-stack,
.dashboard,
.stack-form,
.customer-list,
.activity-list,
.staff-list,
.checklist,
.report-list {
  gap: var(--space-4);
}

.intro-panel {
  min-height: clamp(360px, 52dvh, 620px);
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(15, 14, 8, 0.15) 0%, rgba(26, 21, 8, 0.52) 40%, rgba(13, 13, 13, 0.94) 100%),
    url("https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1400&q=80") center/cover;
  box-shadow: var(--shadow);
}

.intro-panel .eyebrow,
.intro-panel p {
  color: var(--color-neutral-200);
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 16px);
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-md);
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-100);
  font-size: max(16px, var(--text-base));
  transition:
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-neutral-400);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-gold-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.check-label {
  color: var(--color-neutral-100);
  font-weight: 500;
}

.check-label input {
  accent-color: var(--color-gold-primary);
}

.check-label a {
  color: var(--color-gold-light);
}

.primary-btn,
.secondary-btn,
.reward-btn,
.menu-btn,
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost {
  min-width: 44px;
  min-height: clamp(44px, 5vw, 48px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: clamp(8px, 1.5vw, 12px) clamp(16px, 3vw, 24px);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.primary-btn,
.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #B8922E 0%, #E2C47A 50%, #B8922E 100%);
  background-size: 200% auto;
  color: var(--color-bg-primary);
}

.primary-btn:hover,
.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.35);
  transform: translateY(-1px);
}

.primary-btn:active,
.btn-primary:active,
.secondary-btn:active,
.reward-btn:active,
.menu-btn:active {
  transform: translateY(0) scale(0.98);
}

.secondary-btn,
.menu-btn,
.btn-secondary {
  border: 1px solid var(--color-gold-muted);
  background: transparent;
  color: var(--color-gold-primary);
}

.secondary-btn:hover,
.menu-btn:hover,
.btn-secondary:hover {
  border-color: var(--color-gold-primary);
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

.reward-btn,
.btn-ghost {
  border: 1px solid var(--color-neutral-700);
  background: transparent;
  color: var(--color-neutral-200);
}

.reward-btn:hover,
.btn-ghost:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-100);
}

button:focus-visible,
a:focus-visible,
.side-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

.help-text,
.muted-copy,
.result-text,
.customer-card p,
.activity-row span,
.activity-row time,
.staff-row small,
.legal-panel p {
  color: var(--color-neutral-200);
}

.wallet-card {
  max-width: 430px;
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at 100% 0, var(--color-gold-glow), transparent 14rem),
    linear-gradient(160deg, #0F0E08 0%, #1A1508 40%, #0D0D0D 100%);
  color: var(--color-neutral-100);
}

.wallet-top span,
.customer-row span,
.pass-footer span {
  color: var(--color-neutral-200);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.wallet-top strong {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.3;
}

.apple-wallet-btn {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--color-neutral-100) 18%, transparent);
  border-radius: 12px;
  background: var(--color-bg-primary);
  color: var(--color-neutral-100);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    filter var(--duration-fast) var(--ease-standard);
}

.apple-wallet-btn:hover {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px var(--color-gold-glow), var(--shadow-soft);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.apple-wallet-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-glow), var(--shadow-soft);
}

.apple-wallet-btn:active {
  transform: translateY(0) scale(0.98);
}

.apple-wallet-btn img {
  width: min(156px, 100%);
  height: auto;
  display: block;
}

.wallet-actions {
  display: grid;
  gap: var(--space-3);
}

.google-wallet-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--color-neutral-100) 18%, transparent);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #1f1f1f;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.google-wallet-btn span {
  font-size: 0.82rem;
  font-weight: 700;
}

.google-wallet-btn strong {
  font-size: 1rem;
}

.google-wallet-btn::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    conic-gradient(from 90deg, #4285f4 0 25%, #34a853 0 50%, #fbbc04 0 75%, #ea4335 0 100%);
}

.google-wallet-btn:hover {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px var(--color-gold-glow), var(--shadow-soft);
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.google-wallet-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-glow), var(--shadow-soft);
}

.google-wallet-btn:active {
  transform: translateY(0) scale(0.98);
}

.brand-mark {
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-md);
  background: var(--color-gold-primary);
  color: var(--color-bg-primary);
}

.customer-row {
  border-top: 1px solid var(--color-neutral-700);
}

.punch-grid {
  gap: var(--space-3);
}

.punch-grid span {
  border-color: var(--color-neutral-600);
  border-radius: var(--radius-md);
  color: var(--color-neutral-200);
  background: rgba(255, 255, 255, 0.02);
}

.punch-grid span.punched {
  border-color: var(--color-gold-light);
  background: var(--color-gold-primary);
  color: var(--color-bg-primary);
  animation: goldPulse 2s var(--ease-standard) infinite;
}

.qr-box {
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-lg);
  background: var(--color-neutral-100);
}

.workspace {
  min-width: 0;
  grid-template-columns: clamp(220px, 20vw, 280px) minmax(0, 1fr);
  gap: var(--space-6);
}

.workspace > .menu-btn {
  display: none;
}

.side-panel {
  position: sticky;
  top: 24px;
  height: auto;
  min-height: calc(100dvh - 56px);
  overflow-y: auto;
  padding: var(--space-5);
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #111111 0%, #0D0C08 100%);
  box-shadow: var(--shadow-soft);
}

.side-panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
}

.side-tab {
  min-height: 44px;
  margin: 2px 0;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-neutral-200);
  font-size: var(--text-sm);
  font-weight: 400;
}

.side-tab:hover {
  border-color: transparent;
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-100);
}

.side-tab.active {
  border-left: 2px solid var(--color-gold-primary);
  border-color: transparent;
  background: var(--color-gold-glow);
  color: var(--color-gold-primary);
}

#adminApp .side-tab.active {
  border-left-color: var(--admin-gold);
  color: var(--admin-gold);
}

#adminApp .side-panel .eyebrow::after {
  content: " ADMIN";
  display: inline-flex;
  margin-left: var(--space-2);
  padding: 2px 8px;
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-full);
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

#adminApp .panel,
#adminApp .metric-card,
#adminApp .customer-card,
#adminApp .staff-row {
  border-radius: var(--radius-md);
}

#adminApp h1,
#adminApp h2,
#adminApp .side-panel h2,
#adminApp .dashboard-hero h2 {
  font-family: var(--font-primary);
}

#adminApp .primary-btn {
  border: 1px solid var(--color-gold-muted);
  background: transparent;
  color: var(--admin-gold);
}

#adminApp .primary-btn:hover {
  border-color: var(--admin-gold);
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

.workspace-content {
  min-width: 0;
  gap: var(--space-6);
}

.analytics-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--space-5);
}

.dashboard-hero {
  padding: clamp(16px, 3vw, 28px);
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0F0E08 0%, #1A1508 40%, #0D0D0D 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h2,
.list-heading h2,
.compact-top h2,
.section-heading h2 {
  font-size: var(--text-3xl);
}

.dashboard-report-section {
  margin-top: var(--space-10);
}

.filter-controls {
  gap: var(--space-3);
  padding: var(--space-2);
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-soft);
}

.filter-controls label,
.activity-panel .list-heading label {
  min-width: 150px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-200);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    transform var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

.filter-controls label:hover,
.activity-panel .list-heading label:hover,
.filter-controls label:focus-within,
.activity-panel .list-heading label:focus-within {
  border-color: var(--color-gold-muted);
  background: var(--color-bg-elevated);
  box-shadow: 0 0 0 3px var(--color-gold-glow);
  transform: translateY(-1px);
}

.filter-controls select,
.activity-panel select {
  min-height: 44px;
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-md);
  background:
    linear-gradient(45deg, transparent 50%, var(--color-gold-primary) 50%) right 16px top 20px / 7px 7px no-repeat,
    linear-gradient(135deg, var(--color-gold-primary) 50%, transparent 50%) right 11px top 20px / 7px 7px no-repeat,
    var(--color-bg-tertiary);
  color: var(--color-neutral-100);
  font-weight: 500;
}

.metric-card {
  min-height: 118px;
  padding: var(--space-5);
  background: var(--color-bg-secondary);
}

.metric-card span,
.metric-card small,
.staff-metrics span,
.customer-stats span,
.staff-row span {
  color: var(--color-neutral-200);
  font-size: var(--text-sm);
  font-weight: 500;
}

.metric-card strong,
.staff-metrics strong {
  color: var(--color-neutral-100);
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
}

.chart-panel {
  min-height: 520px;
}

.chart-panel > .panel-heading h3 {
  font-size: var(--text-2xl);
}

.chart-side-card {
  min-height: 520px;
  max-height: 520px;
  padding: clamp(16px, 3vw, 28px);
}

.bar-list {
  gap: var(--space-3);
  padding: var(--space-2);
}

.bar-column {
  min-height: 300px;
}

.bar-column span,
.bar-column strong {
  color: var(--color-neutral-200);
  font-size: var(--text-sm);
  font-weight: 500;
}

.bar-column div {
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-sm);
  background: var(--color-bg-tertiary);
}

.bar-column i {
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold-primary));
}

.bar-column.active div {
  outline: 3px solid var(--color-gold-glow);
}

.chart-details {
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: var(--color-bg-tertiary);
}

.chart-details p {
  color: var(--color-neutral-200);
}

.customer-insight-row {
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
}

.customer-insight-row span {
  color: var(--color-neutral-100);
  font-weight: 500;
}

.customer-insight-row small,
.customer-insight-row em {
  color: var(--color-neutral-200);
  font-weight: 400;
}

.scanner-box {
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 45%, var(--color-gold-glow), transparent 12rem),
    var(--color-bg-primary);
}

.scan-frame {
  border-color: var(--color-gold-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45), 0 0 24px rgba(201, 168, 76, 0.22);
}

.staff-metrics {
  gap: var(--space-4);
}

.staff-metrics article {
  padding: var(--space-5);
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: var(--color-bg-tertiary);
}

.panel-heading,
.list-heading {
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-700);
}

.launch-panel {
  background: linear-gradient(160deg, #0F0E08 0%, #1A1508 40%, #0D0D0D 100%);
  color: var(--color-neutral-100);
}

.launch-panel .eyebrow,
.launch-panel .muted-copy {
  color: var(--color-neutral-200);
}

.launch-panel.launch-ready {
  background:
    linear-gradient(160deg, rgba(15, 14, 8, 0.96), rgba(74, 124, 89, 0.78)),
    var(--color-bg-primary);
}

.readiness-ring {
  border-color: rgba(201, 168, 76, 0.3);
  background: var(--color-gold-glow);
  color: var(--color-neutral-100);
}

.launch-ready .readiness-ring {
  border-color: rgba(74, 124, 89, 0.7);
  background: rgba(74, 124, 89, 0.22);
}

.readiness-ring span {
  color: var(--color-neutral-200);
}

.check-item,
.report-row,
.activity-row.needs-review,
.activity-row.selected-row {
  border-color: var(--color-neutral-700);
  border-radius: var(--radius-lg);
  background: var(--color-bg-tertiary);
}

.check-mark {
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

.check-item.complete .check-mark {
  background: var(--color-success);
  color: var(--color-neutral-100);
}

.check-item span,
.report-row span,
.report-row small,
.check-status {
  color: var(--color-neutral-200);
  font-size: var(--text-sm);
}

.report-row.warning {
  border-color: var(--color-warning-line);
  background: var(--color-warning-soft);
}

.report-score {
  color: var(--color-gold-light);
  font-family: var(--font-mono);
}

.customer-card,
.staff-row {
  padding: var(--space-5);
}

.customer-card:hover {
  border-color: var(--color-gold-muted);
}

.activity-row {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-700);
}

.activity-row.needs-review strong {
  color: var(--color-danger-text);
}

.activity-row.is-selectable:hover {
  background: var(--color-bg-tertiary);
}

.activity-row.selected-row {
  border-color: var(--color-gold-primary);
  background: var(--color-gold-glow);
}

.empty,
.app-error {
  border: 1px dashed var(--color-neutral-600);
  border-radius: var(--radius-lg);
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-200);
}

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

.legal-panel {
  max-width: 860px;
  gap: var(--space-4);
  padding: clamp(18px, 3vw, 32px);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: clamp(2px, 0.5vw, 4px) clamp(8px, 1.5vw, 12px);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.badge-gold {
  border: 1px solid var(--color-gold-muted);
  background: rgba(201, 168, 76, 0.15);
  color: var(--color-gold-light);
}

.badge-success {
  border: 1px solid var(--color-success-line);
  background: var(--color-success-soft);
  color: var(--color-success-text);
}

.badge-danger {
  border: 1px solid var(--color-danger-line);
  background: var(--color-danger-soft);
  color: var(--color-danger-text);
}

.badge-neutral {
  border: 1px solid var(--color-neutral-700);
  background: var(--color-bg-tertiary);
  color: var(--color-neutral-200);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-neutral-700);
  border-radius: var(--radius-lg);
}

.table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-tertiary);
  color: var(--color-gold-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-neutral-700);
  color: var(--color-neutral-200);
}

.table tr:hover td {
  background: var(--color-bg-tertiary);
}

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--color-bg-tertiary) 25%, rgba(201, 168, 76, 0.08) 50%, var(--color-bg-tertiary) 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s infinite linear;
}

.auth-transition {
  animation: fadeIn var(--duration-medium) var(--ease-enter);
}

.auth-loading-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-full);
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.turnstile-slot {
  display: none;
  min-height: 0;
}

.turnstile-slot.is-active {
  display: block;
  min-height: 65px;
  overflow: hidden;
}

.wallet-skeleton-card {
  gap: var(--space-5);
}

.skeleton-line,
.skeleton-button,
.skeleton-nav,
.skeleton-video,
.skeleton-chart,
.skeleton-qr,
.skeleton-chip {
  display: block;
}

.skeleton-line {
  width: 100%;
  height: clamp(14px, 2.4vw, 18px);
}

.skeleton-line.medium {
  width: 64%;
}

.skeleton-line.short {
  width: 38%;
}

.skeleton-button {
  width: min(220px, 100%);
  min-height: 44px;
}

.skeleton-nav {
  width: 100%;
  min-height: 44px;
}

.skeleton-chip {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
}

.skeleton-qr {
  width: min(180px, 62vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

.skeleton-video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
}

.skeleton-chart {
  width: 100%;
  min-height: clamp(180px, 28vw, 300px);
}

.skeleton-punches span {
  display: block;
  aspect-ratio: 1;
  border: 1px solid var(--color-gold-muted);
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 76, 0.14);
}

.auth-side-skeleton {
  pointer-events: none;
}

.auth-analytics-skeleton {
  margin-bottom: var(--space-5);
}

.auth-analytics-skeleton .metric-card {
  min-height: clamp(92px, 10vw, 128px);
}

code,
.report-score,
.metric-card strong,
.staff-metrics strong {
  font-family: var(--font-mono);
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .side-panel {
    width: 64px;
    padding: var(--space-3);
  }

  .side-panel h2,
  .side-panel .eyebrow,
  .side-panel .secondary-btn {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
  }

  .side-tab {
    justify-content: center;
    padding: var(--space-3);
    text-align: center;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 12% 0, rgba(201, 168, 76, 0.1), transparent 22rem),
      linear-gradient(135deg, #121418 0%, #17160F 50%, #121418 100%);
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    width: 100%;
    max-width: 100%;
    padding: var(--space-4) 16px calc(56px + var(--space-6));
  }

  .site-header,
  .dashboard-top {
    min-height: auto;
  }

  .workspace {
    display: block;
  }

  .workspace-content {
    gap: var(--space-4);
  }

  .menu-btn {
    display: inline-flex;
    position: sticky;
    top: var(--space-3);
    z-index: var(--z-sticky);
    margin-bottom: var(--space-3);
  }

  .workspace > .menu-btn {
    display: inline-flex;
  }

  .side-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--z-drawer);
    width: min(86vw, 320px);
    height: 100dvh;
    min-height: 100dvh;
    max-width: none;
    padding: var(--space-5);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transform: translateX(-105%);
    transition: transform var(--duration-medium) var(--ease-standard);
  }

  .workspace-content {
    margin-left: 0;
  }

  .side-panel h2,
  .side-panel .eyebrow,
  .side-panel .secondary-btn {
    max-width: none;
    opacity: 1;
    pointer-events: auto;
  }

  .side-tab {
    justify-content: flex-start;
    text-align: left;
  }

  .workspace.menu-open .side-panel {
    transform: translateX(0);
  }

  .auth-layout,
  .pass-layout,
  .admin-grid,
  .dashboard-grid,
  .staff-layout,
  .settings-layout,
  .onboarding-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .intro-panel,
  .wallet-card,
  .customer-card,
  .metric-card,
  .staff-row {
    padding: var(--space-4);
  }

  .button-row > *,
  .primary-btn,
  .secondary-btn,
  .reward-btn {
    width: 100%;
  }

  .filter-controls {
    width: 100%;
    display: grid;
  }

  .filter-controls label,
  .activity-panel .list-heading label {
    min-width: 0;
  }

  .chart-side-card {
    min-height: 340px;
    max-height: 340px;
  }

  #customerDashboard .pass-layout {
    max-width: 420px;
    margin: 0 auto;
  }

  #customerDashboard .wallet-card,
  #customerDashboard .stack-form {
    max-width: 420px;
    margin: 0 auto;
  }

  #customerDashboard .qr-box {
    width: min(66vw, 210px);
  }
}

@media (max-width: 560px) {
  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    padding-right: 16px;
    padding-left: 16px;
  }

  .site-header,
  .dashboard-top,
  .customer-card,
  .staff-row,
  .activity-row,
  .panel-heading,
  .list-heading,
  .inline-form,
  .launch-panel,
  .check-item,
  .report-row {
    grid-template-columns: 1fr;
  }

  .analytics-grid,
  .staff-metrics {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 300px;
  }

  .privacy-copy {
    font-size: var(--text-sm);
    white-space: normal;
  }

  .vertical-bars,
  .vertical-bars.compact-bars,
  .vertical-bars.mini-bars {
    min-width: 0;
    width: 100%;
    gap: 6px;
  }

  .vertical-bars {
    grid-template-columns: repeat(7, minmax(18px, 1fr));
  }

  .vertical-bars.compact-bars {
    grid-template-columns: repeat(10, minmax(14px, 1fr));
  }

  .vertical-bars.mini-bars {
    grid-template-columns: repeat(auto-fit, minmax(12px, 1fr));
  }

  .bar-column {
    min-height: 210px;
    gap: 6px;
  }

  .bar-column div {
    width: min(18px, 100%);
    height: 150px;
    justify-self: center;
  }

  .compact-bars .bar-column div,
  .mini-bars .bar-column div {
    width: min(14px, 100%);
    height: 120px;
  }

  .form-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .form-heading h3 {
    white-space: nowrap;
  }

  .form-heading .secondary-btn {
    width: auto;
    min-width: 64px;
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }
}

@media (max-width: 380px) {
  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    padding-right: 16px;
    padding-left: 16px;
  }

  #customerDashboard .pass-layout,
  #customerDashboard .wallet-card,
  #customerDashboard .stack-form {
    max-width: 100%;
  }
}

body[data-theme="light"] {
  color-scheme: light;
  --color-bg-primary: #F5EFE4;
  --color-bg-secondary: #FEFCF6;
  --color-bg-tertiary: #DACCB0;
  --color-bg-elevated: #FEFCF6;
  --color-gold-tint: #FDF3D0;
  --color-gold-light: #E8C870;
  --color-gold-primary: #C9A84C;
  --color-gold-muted: #A07830;
  --color-gold-deep: #A07830;
  --color-gold-dark: #7A5A1E;
  --color-gold-ink: #2A1E08;
  --color-neutral-100: #1E1508;
  --color-neutral-200: #7A6040;
  --color-neutral-400: #B8A888;
  --color-neutral-600: #A89878;
  --color-neutral-700: #C8B890;
  --color-success: #EEF5EE;
  --color-warning: #FEF3E0;
  --color-danger: #FAEEEE;
  --color-info: #EEF2FA;
  --color-success-soft: #EEF5EE;
  --color-success-line: #C8B890;
  --color-success-text: #566B46;
  --color-warning-soft: #FEF3E0;
  --color-warning-line: #E8C870;
  --color-warning-text: #7A5A1E;
  --color-danger-soft: #FAEEEE;
  --color-danger-line: #D8B2A6;
  --color-danger-text: #7C3D2E;
  --color-info-soft: #EEF2FA;
  --color-info-line: #C8B890;
  --color-info-text: #5E5A40;
  --color-gold-glow: rgba(201, 168, 76, 0.2);
  --bg: var(--color-bg-primary);
  --paper: var(--color-bg-secondary);
  --ink: var(--color-neutral-100);
  --muted: var(--color-neutral-200);
  --line: var(--color-neutral-700);
  --black: var(--color-gold-ink);
  --soft-red: var(--color-gold-glow);
  --shadow: 0 24px 60px rgba(42, 30, 8, 0.16);
  --shadow-soft: 0 14px 34px rgba(42, 30, 8, 0.11);
  background:
    radial-gradient(circle at 18% 0, rgba(253, 243, 208, 0.82), transparent 30rem),
    radial-gradient(circle at 92% 20%, rgba(232, 200, 112, 0.18), transparent 28rem),
    linear-gradient(135deg, #F5EFE4 0%, #EFE5D4 48%, #FEFCF6 100%);
}

body[data-theme="light"] .theme-toggle {
  background: rgba(254, 252, 246, 0.92);
  color: var(--color-gold-muted);
}

body[data-theme="light"] .theme-toggle span::before {
  content: "☀";
}

body[data-theme="light"] .app-shell {
  background: transparent;
}

body[data-theme="light"] .panel,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .customer-card,
body[data-theme="light"] .staff-row,
body[data-theme="light"] .chart-side-card,
body[data-theme="light"] .side-panel {
  background: rgba(254, 252, 246, 0.95);
  border-color: var(--color-neutral-700);
}

body[data-theme="light"] .side-panel {
  background: linear-gradient(180deg, rgba(232, 222, 200, 0.98), rgba(218, 204, 176, 0.96));
}

body[data-theme="light"] .dashboard-hero,
body[data-theme="light"] .launch-panel {
  background:
    radial-gradient(circle at 100% 0, rgba(253, 243, 208, 0.82), transparent 18rem),
    linear-gradient(160deg, #FEFCF6 0%, #FDF3D0 48%, #F5EFE4 100%);
}

body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select,
body[data-theme="light"] .filter-controls,
body[data-theme="light"] .filter-controls label,
body[data-theme="light"] .activity-panel .list-heading label,
body[data-theme="light"] .chart-details,
body[data-theme="light"] .staff-metrics article,
body[data-theme="light"] .empty,
body[data-theme="light"] .app-error,
body[data-theme="light"] .check-item,
body[data-theme="light"] .report-row,
body[data-theme="light"] .customer-insight-row {
  background-color: var(--color-bg-tertiary);
  color: var(--color-neutral-100);
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: var(--color-neutral-400);
}

body[data-theme="light"] .table th,
body[data-theme="light"] .table td,
body[data-theme="light"] .panel-heading,
body[data-theme="light"] .list-heading,
body[data-theme="light"] .activity-row,
body[data-theme="light"] .log-row {
  border-color: var(--color-neutral-600);
}

body[data-theme="light"] .wallet-card {
  background:
    radial-gradient(circle at 100% 0, rgba(201, 168, 76, 0.18), transparent 14rem),
    linear-gradient(160deg, #20242A 0%, #171A1F 44%, #121418 100%);
  color: #F5F0E8;
}

body[data-theme="light"] .intro-panel {
  border-color: rgba(201, 168, 76, 0.3);
}

body[data-theme="light"] .intro-panel h2,
body[data-theme="light"] .intro-panel p {
  color: #F5F0E8;
}

body[data-theme="light"] .intro-panel .eyebrow {
  color: var(--color-gold-light);
}

body[data-theme="light"] .primary-btn {
  color: var(--color-gold-ink);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Desktop polish refinements */
@media (min-width: 761px) {
  body {
    background:
      radial-gradient(circle at 18% 0, rgba(201, 168, 76, 0.13), transparent 28rem),
      radial-gradient(circle at 92% 18%, rgba(245, 240, 232, 0.055), transparent 30rem),
      linear-gradient(135deg, #121418 0%, #17160F 46%, #121418 100%);
  }

  .app-shell {
    display: block;
    overflow: visible;
    background: transparent;
  }

  .portal {
    padding-top: var(--space-8);
    overflow: visible;
  }

  .workspace {
    --desktop-sidebar-width: clamp(220px, 20vw, 280px);
    --desktop-sidebar-left: max(clamp(16px, 4vw, 48px), calc((100vw - var(--container-2xl)) / 2 + clamp(16px, 4vw, 48px)));
    display: block;
    overflow: visible;
  }

  .side-panel {
    position: fixed;
    top: var(--space-6);
    left: var(--desktop-sidebar-left);
    width: var(--desktop-sidebar-width);
    height: calc(100dvh - (var(--space-6) * 2));
    max-height: calc(100dvh - (var(--space-6) * 2));
    min-height: 0;
    padding: var(--space-5);
  }

  .workspace-content {
    margin-left: calc(var(--desktop-sidebar-width) + var(--space-6));
  }

  .side-panel h2,
  .side-panel .eyebrow,
  .side-panel .secondary-btn {
    overflow: visible;
    max-width: none;
    opacity: 1;
    pointer-events: auto;
  }

  .side-tab {
    justify-content: flex-start;
    padding: var(--space-3) var(--space-5);
    text-align: left;
  }

  #analyticsGrid,
  #reportHealthGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel,
  .metric-card,
  .customer-card,
  .staff-row,
  .chart-side-card {
    background: rgba(20, 18, 14, 0.92);
  }

  .dashboard-hero {
    background:
      radial-gradient(circle at 100% 0, rgba(201, 168, 76, 0.12), transparent 18rem),
      linear-gradient(160deg, #1b1710 0%, #15130f 48%, #101010 100%);
  }
}

@media (max-width: 560px) {
  #adminDashboardSection .chart-panel {
    min-height: auto;
    padding-bottom: var(--space-3);
  }

  #adminDashboardSection .chart-panel .panel-heading {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
  }

  #adminDashboardSection .chart-panel > .panel-heading h3 {
    font-size: var(--text-xl);
  }

  #adminDashboardSection #weeklyBars {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Final production mobile/layout enforcement. Keep last in file. */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 0, var(--color-gold-glow), transparent 30rem),
    linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-warm) 48%, var(--color-bg-primary) 100%);
}

body:not([data-theme="light"]) {
  --color-bg-primary: #141210;
}

button,
a,
input,
select,
textarea,
.side-tab,
.nav-item,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
  font-size: max(12px, var(--text-sm));
}

.panel,
.metric-card,
.customer-card,
.wallet-card,
.staff-row,
.report-panel,
.chart-side-card {
  overflow: hidden;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 56px;
  }

  .portal,
  #staffApp:has(.workspace:not(.hidden)),
  #adminApp:has(.workspace:not(.hidden)) {
    width: 100%;
    max-width: 100%;
    padding-right: 16px;
    padding-bottom: calc(56px + var(--space-6));
    padding-left: 16px;
  }

  .workspace {
    display: block;
  }

  .workspace-content {
    margin-left: 0;
    padding-bottom: 56px;
  }

  .workspace > .menu-btn {
    display: none;
  }

  .side-panel,
  .workspace.menu-open .side-panel {
    position: fixed;
    inset: auto 0 0 0;
    z-index: var(--z-sticky);
    display: block;
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    transform: none;
    background: var(--color-bg-secondary);
  }

  .side-panel > div,
  .side-panel h2,
  .side-panel .eyebrow {
    display: none;
  }

  .side-panel > .secondary-btn {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: calc(var(--z-sticky) + 1);
    display: inline-flex;
    width: auto;
    max-width: 140px;
    padding-inline: var(--space-4);
  }

  .side-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: 56px;
    gap: 0;
  }

  .side-tab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 56px;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: 0;
    font-size: var(--text-xs);
    line-height: 1.1;
    text-align: center;
  }

  .side-tab::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    background: currentColor;
    opacity: 0.78;
    -webkit-mask: radial-gradient(circle at 50% 50%, currentColor 45%, transparent 47%);
    mask: radial-gradient(circle at 50% 50%, currentColor 45%, transparent 47%);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .auth-layout,
  .pass-layout,
  .admin-grid,
  .dashboard-grid,
  .staff-layout,
  .settings-layout,
  .report-grid,
  .onboarding-layout,
  .button-row,
  .inline-form,
  .filter-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  label,
  input,
  select,
  textarea,
  .primary-btn,
  .secondary-btn,
  .reward-btn {
    width: 100%;
  }
}

/* Final light theme palette enforcement. */
body[data-theme="light"] {
  color-scheme: light;
  --color-light-mist: #F3F8FF;
  --color-light-sky: #D6E6FF;
  --color-light-blue: #BFD4FF;
  --color-light-lilac: #E9E0FF;
  --color-light-blush: #FFF3FB;
  --color-charcoal-primary: #222222;
  --color-blue-primary: var(--color-light-blue);
  --color-blue-soft: var(--color-light-sky);
  --color-blue-muted: color-mix(in srgb, var(--color-light-blue) 58%, var(--color-charcoal-primary));
  --color-bg-primary: var(--color-light-mist);
  --color-bg-secondary: var(--color-light-blush);
  --color-bg-tertiary: var(--color-light-sky);
  --color-bg-elevated: var(--color-light-lilac);
  --color-nav-bg: var(--color-light-blue);
  --color-neutral-100: var(--color-charcoal-primary);
  --color-neutral-200: color-mix(in srgb, var(--color-charcoal-primary) 70%, var(--color-light-blue));
  --color-neutral-400: color-mix(in srgb, var(--color-charcoal-primary) 44%, var(--color-light-lilac));
  --color-neutral-600: color-mix(in srgb, var(--color-charcoal-primary) 24%, var(--color-light-blue));
  --color-neutral-700: color-mix(in srgb, var(--color-charcoal-primary) 18%, var(--color-light-blue));
  --color-gold-tint: var(--color-light-blush);
  --color-gold-primary: var(--color-light-blue);
  --color-gold-muted: color-mix(in srgb, var(--color-charcoal-primary) 38%, var(--color-light-blue));
  --color-gold-deep: color-mix(in srgb, var(--color-charcoal-primary) 48%, var(--color-light-blue));
  --color-gold-dark: var(--color-charcoal-primary);
  --color-gold-light: var(--color-light-lilac);
  --color-gold-ink: var(--color-charcoal-primary);
  --color-success: var(--color-light-sky);
  --color-success-soft: var(--color-light-mist);
  --color-success-text: color-mix(in srgb, var(--color-charcoal-primary) 76%, var(--color-light-blue));
  --color-success-line: var(--color-light-blue);
  --color-warning: var(--color-light-lilac);
  --color-warning-soft: var(--color-light-lilac);
  --color-warning-text: color-mix(in srgb, var(--color-charcoal-primary) 74%, var(--color-light-lilac));
  --color-warning-line: var(--color-light-blue);
  --color-danger: var(--color-light-blush);
  --color-danger-soft: var(--color-light-blush);
  --color-danger-text: color-mix(in srgb, var(--color-charcoal-primary) 78%, var(--color-light-blush));
  --color-danger-line: var(--color-light-lilac);
  --color-info: var(--color-light-sky);
  --color-info-soft: var(--color-light-sky);
  --color-info-text: var(--color-charcoal-primary);
  --color-info-line: var(--color-light-blue);
  --color-gold-glow: color-mix(in srgb, var(--color-light-blue) 42%, transparent);
  --bg: var(--color-bg-primary);
  --paper: var(--color-bg-secondary);
  --ink: var(--color-neutral-100);
  --muted: var(--color-neutral-200);
  --line: var(--color-neutral-700);
  --black: var(--color-gold-ink);
  --soft-red: var(--color-gold-glow);
  --shadow: 0 24px 60px color-mix(in srgb, var(--color-charcoal-primary) 16%, transparent);
  --shadow-soft: 0 14px 34px color-mix(in srgb, var(--color-charcoal-primary) 11%, transparent);
  background:
    radial-gradient(circle at 18% 0, var(--color-light-lilac), transparent 30rem),
    radial-gradient(circle at 92% 20%, var(--color-light-blue), transparent 28rem),
    linear-gradient(135deg, var(--color-light-mist) 0%, var(--color-light-sky) 46%, var(--color-light-blush) 100%);
}

body[data-theme="light"] .side-panel {
  background:
    linear-gradient(180deg, var(--color-nav-bg) 0%, var(--color-bg-secondary) 100%);
  border-color: color-mix(in srgb, var(--color-light-blue) 70%, white);
  box-shadow: 0 28px 70px color-mix(in srgb, var(--color-light-blue) 46%, transparent);
}

body[data-theme="light"] .panel,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .customer-card,
body[data-theme="light"] .staff-row,
body[data-theme="light"] .chart-side-card {
  background: color-mix(in srgb, white 86%, var(--color-light-blush));
  border-color: var(--color-neutral-700);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--color-light-blue) 35%, transparent);
}

body[data-theme="light"] .workspace-content,
body[data-theme="light"] .auth-layout,
body[data-theme="light"] .pass-layout {
  background:
    radial-gradient(circle at 78% 0, color-mix(in srgb, var(--color-light-lilac) 58%, transparent), transparent 26rem),
    radial-gradient(circle at 0 72%, color-mix(in srgb, var(--color-light-blue) 42%, transparent), transparent 26rem);
}

body[data-theme="light"] .dashboard-hero,
body[data-theme="light"] .launch-panel {
  background:
    radial-gradient(circle at 100% 0, var(--color-light-lilac), transparent 18rem),
    linear-gradient(160deg, var(--color-light-blush) 0%, var(--color-light-sky) 50%, var(--color-light-mist) 100%);
  border-color: var(--color-neutral-700);
}

body[data-theme="light"] .side-tab.active,
body[data-theme="light"] .side-tab:hover {
  border-color: color-mix(in srgb, white 72%, var(--color-light-blue));
  background: color-mix(in srgb, white 74%, var(--color-light-blush));
  color: var(--color-charcoal-primary);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-light-blue) 38%, transparent);
}

body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select,
body[data-theme="light"] .filter-controls,
body[data-theme="light"] .filter-controls label,
body[data-theme="light"] .activity-panel .list-heading label,
body[data-theme="light"] .chart-details,
body[data-theme="light"] .staff-metrics article,
body[data-theme="light"] .empty,
body[data-theme="light"] .app-error,
body[data-theme="light"] .check-item,
body[data-theme="light"] .report-row,
body[data-theme="light"] .customer-insight-row {
  background-color: color-mix(in srgb, white 62%, var(--color-bg-tertiary));
  color: var(--color-neutral-100);
}

body[data-theme="light"] .metric-card strong,
body[data-theme="light"] .report-score,
body[data-theme="light"] .top-customers-list > li > span,
body[data-theme="light"] .eyebrow {
  color: var(--color-blue-muted);
}

body[data-theme="light"] .table th,
body[data-theme="light"] .table td,
body[data-theme="light"] .panel-heading,
body[data-theme="light"] .list-heading,
body[data-theme="light"] .activity-row,
body[data-theme="light"] .log-row {
  border-color: var(--color-neutral-600);
}

body[data-theme="light"] .wallet-card {
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--color-light-lilac) 55%, transparent), transparent 14rem),
    linear-gradient(160deg, var(--color-charcoal-primary) 0%, color-mix(in srgb, var(--color-charcoal-primary) 82%, var(--color-light-blue)) 54%, var(--color-neutral-100) 100%);
  color: var(--color-light-mist);
}

body[data-theme="light"] .apple-wallet-btn {
  background: var(--color-charcoal-primary);
  color: var(--color-blue-primary);
  border-color: color-mix(in srgb, var(--color-blue-primary) 48%, var(--color-charcoal-primary));
}

body[data-theme="light"] .intro-panel {
  border-color: var(--color-gold-light);
}

body[data-theme="light"] .intro-panel h2,
body[data-theme="light"] .intro-panel p {
  color: var(--color-gold-tint);
}

/* Final form-control sizing pass. Keep native check/radio controls compact while labels remain tappable. */
input[type="radio"],
input[type="checkbox"],
.radio-options input,
.check-label input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
}

.check-label {
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: 16px minmax(0, auto);
  column-gap: 8px;
  align-items: center;
}

.compact-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.compact-choice legend {
  float: left;
  margin: 0;
  padding: 0;
}

.compact-choice .radio-options,
.audience-toggle .radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-choice .radio-options label,
.audience-toggle .radio-options label {
  min-height: 32px;
  width: auto;
  grid-template-columns: 16px auto;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  font-size: var(--text-sm);
}

.password-strength[hidden] {
  display: none;
}

@media (max-width: 767px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  input[type="radio"],
  input[type="checkbox"],
  .radio-options input,
  .check-label input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
  }

  .check-label,
  .compact-choice .radio-options label,
  .audience-toggle .radio-options label {
    width: fit-content;
  }

  #staffLogout,
  #adminLogout {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: calc(var(--z-sticky) + 3);
    width: auto;
    min-width: 44px;
    max-width: none;
    min-height: 44px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-full);
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-soft);
  }
}
