:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: #f3f6ff;
  --line: rgba(28, 48, 163, 0.08);
  --line-strong: rgba(28, 48, 163, 0.14);
  --text: #0f1115;
  --muted: #5b6270;
  --accent: #1c30a3;
  --accent-soft: rgba(28, 48, 163, 0.09);
  --warm: #1c30a3;
  --warm-soft: rgba(28, 48, 163, 0.09);
  --danger: #b3472d;
  --success: #1c30a3;
  --display-font: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --body-font: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  --shadow: 0 18px 34px rgba(28, 48, 163, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(28, 48, 163, 0.08), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(28, 48, 163, 0.05), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  font-family: var(--body-font);
}

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

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.app-root {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.stack-gap {
  display: grid;
  gap: 20px;
}

#appShell[data-current-role="employee"] #auctionOverviewGrid {
  grid-template-columns: minmax(0, 1fr);
}

#appShell[data-current-role="employee"] #auctionSettingsPanel,
#appShell[data-current-role="employee"] #auctionContentGrid,
#appShell[data-current-role="employee"] #auctionHistoryPanel {
  display: none !important;
}

#appShell[data-current-role="employee"] [data-screen="auction"] .screen-head {
  display: none !important;
}

#appShell[data-current-role="employee"] [data-screen="home"] .screen-head {
  display: none !important;
}

#appShell[data-current-role="employee"] #auctionOverviewGrid .panel {
  width: 100%;
}

#appShell[data-current-role="employee"] #auctionCountdownValue {
  width: 100%;
  display: block;
  text-align: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -1px 0 rgba(31, 33, 35, 0.05);
}

#appShell[data-current-role="employee"] #auctionAnnouncement {
  margin-top: 2px;
}

#appShell[data-current-role="employee"] [data-screen="wallet"] .wallet-layout {
  grid-template-columns: minmax(0, 1fr);
}

#appShell[data-current-role="employee"] [data-screen="home"] #homeStats .stat-card {
  text-align: center;
}

#appShell[data-current-role="employee"] [data-screen="home"] #homeStats .stat-card span {
  font-size: 0.9rem;
}

#appShell[data-current-role="employee"] [data-screen="home"] #homeStats .stat-card strong {
  margin-top: 10px;
  font-size: clamp(3rem, 7vw, 4.6rem);
}

#appShell #pageHeading,
#appShell .screen-head {
  display: none;
}

#adminControlGrid {
  align-items: start;
}

#adminControlGrid .stack-column {
  align-content: start;
  align-self: start;
}

#auctionContentGrid {
  align-content: start;
  align-items: start;
}

.admin-catalog-grid {
  align-items: start;
}

.settings-view {
  display: grid;
  gap: 16px;
}

.app-notice {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-bottom: 14px;
}

.auth-shell {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 440px);
  gap: 18px;
  align-items: center;
}

.email-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 16, 34, 0.36);
  backdrop-filter: blur(8px);
}

.email-modal[hidden] {
  display: none !important;
}

.email-modal-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 60px rgba(10, 20, 60, 0.18);
  padding: 28px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.email-modal-card h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.8vw, 3.2rem);
  line-height: 1.05;
}

.email-modal-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.6;
}

.reward-modal {
  padding: 18px;
}

.reward-modal .email-modal-card {
  width: min(500px, 100%);
  border: none;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 40px rgba(10, 20, 60, 0.2);
  padding: 22px 24px 26px;
  gap: 18px;
}

.reward-modal .email-modal-card .eyebrow {
  display: none;
}

.reward-modal .email-modal-card h2 {
  color: var(--accent);
  font-size: clamp(2.35rem, 5.4vw, 4rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.reward-modal .email-modal-card p {
  color: #0a0a0a;
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  font-weight: 900;
  line-height: 1.02;
  white-space: pre-line;
}

.reward-modal .email-modal-card .primary-button {
  margin-top: 4px;
  font-size: 1.05rem;
}

.bonus-modal {
  width: min(480px, calc(100vw - 36px));
  padding: 28px 20px 20px;
  gap: 18px;
  overflow: hidden;
}

.bonus-modal h2 {
  color: #0f1115;
  font-size: clamp(1.72rem, 6.6vw, 2.55rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  word-break: keep-all;
}

.bonus-modal p {
  max-width: 100%;
  color: #0f1115;
  font-size: clamp(1rem, 3.4vw, 1.16rem);
  font-weight: 700;
  line-height: 1.28;
  white-space: pre-line;
}

.bonus-modal .primary-button {
  width: 100%;
  margin-top: 4px;
}

.auth-brand,
.auth-card,
.panel,
.app-nav,
.app-header,
.notice-banner,
.locked-state,
.preview-box,
.wallet-hero {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-brand,
.auth-card,
.panel,
.app-nav,
.app-header {
  padding: 24px;
}

.auth-brand {
  display: grid;
  gap: 16px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #101a59 100%);
  font-family: var(--display-font);
  font-size: 1.4rem;
  font-weight: 900;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  object-fit: contain;
  flex: none;
}

.brand-logo-large {
  width: min(380px, 90vw);
  height: auto;
}

.brand-logo-small {
  width: 48px;
  height: 48px;
}

.brand-lockup .eyebrow {
  margin-bottom: 0;
  font-size: 0.88rem;
  line-height: 1;
}

.eyebrow,
.mini-label,
.identity-chip span,
.stat-card span,
.credential-chip,
.nav-button,
.item-chip {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--warm);
  font-size: 0.74rem;
  font-weight: 900;
}

.auth-brand h1,
.form-head h2,
.app-header h2,
.screen-head h3,
.panel-head h4,
.wallet-hero h3 {
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.auth-brand h1 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(2.7rem, 5vw, 4.6rem);
  line-height: 0.92;
}

.auth-copy,
.feature-stack p,
.form-head p,
.install-note,
.identity-chip span,
.stat-card p,
.list-meta,
.locked-state,
.preview-box,
.wallet-note,
.list-note {
  color: var(--muted);
  line-height: 1.55;
}

.feature-stack {
  display: grid;
  gap: 12px;
}

.feature-stack article {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.feature-stack article:first-child {
  border-top: 0;
  padding-top: 0;
}

.feature-stack strong,
.identity-chip strong,
.wallet-amount,
.list-value,
.stat-card strong {
  font-family: var(--display-font);
  font-weight: 900;
}

.secondary-button,
.primary-button,
.ghost-button,
.auth-tab,
.credential-chip,
.nav-button,
.action-button,
.text-button {
  border: 0;
  border-radius: 999px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  padding: 0 18px;
  font-weight: 800;
}

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

.secondary-button {
  color: var(--accent);
  background: var(--accent-soft);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px var(--line);
}

.text-button {
  min-height: auto;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 800;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.auth-tab:hover,
.credential-chip:hover,
.nav-button:hover,
.action-button:hover,
.list-card:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.install-note {
  margin: 0;
  font-size: 0.92rem;
}

.auth-card {
  display: grid;
  gap: 18px;
}

.auth-toggle,
.demo-credentials,
.header-actions,
.screen-head,
.panel-head,
.nav-row,
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-toggle {
  padding: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.auth-tab {
  flex: 1;
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.auth-tab.active {
  color: #fff;
  background: var(--accent);
}

.split-actions {
  justify-content: space-between;
  align-items: center;
}

.auth-form,
.app-form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 14px;
}

.field-row.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form label,
.app-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  outline: 0;
}

textarea {
  min-height: 108px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(28, 48, 163, 0.28);
  box-shadow: 0 0 0 4px rgba(28, 48, 163, 0.09);
}

input[readonly] {
  background: #f4f7ff;
}

.full-width {
  width: 100%;
}

.form-head h2,
.form-head p {
  margin-bottom: 0;
}

.mini-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.credential-chip,
.nav-button,
.item-chip,
.action-button {
  min-height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}

.credential-chip,
.action-button {
  width: fit-content;
}

.notice-banner,
.locked-state,
.preview-box {
  padding: 14px 16px;
}

.preview-box {
  font-size: 0.94rem;
}

.preview-box .panel-head.compact {
  margin-bottom: 8px;
}

.invite-link-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.invite-link-row input {
  width: 100%;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 0.92rem;
  font-family: "SFMono-Regular", ui-monospace, "Menlo", "Monaco", Consolas, monospace;
  letter-spacing: 0.01em;
}

.invite-link-row input:focus {
  outline: 2px solid rgba(28, 48, 163, 0.18);
  outline-offset: 2px;
}

.notice-banner[data-tone="success"] {
  color: var(--success);
  border-color: rgba(28, 48, 163, 0.18);
  background: rgba(28, 48, 163, 0.07);
}

.notice-banner[data-tone="danger"] {
  color: var(--danger);
  border-color: rgba(179, 71, 45, 0.18);
  background: rgba(179, 71, 45, 0.07);
}

.app-shell {
  position: relative;
  display: grid;
  gap: 16px;
}

.app-header,
.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 0.95;
}

.identity-chip {
  display: grid;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.identity-chip strong {
  font-size: 1.1rem;
}

.identity-chip span {
  font-size: 0.68rem;
  font-weight: 800;
}

.nav-row {
  width: 100%;
}

.nav-button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.app-menu {
  display: grid;
  justify-content: end;
}

.app-menu-card {
  width: min(320px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.identity-chip-menu {
  margin-bottom: 12px;
}

.menu-link-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.menu-link {
  justify-content: flex-start;
  color: var(--accent);
  background: rgba(236, 241, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(28, 48, 163, 0.14),
    0 8px 18px rgba(28, 48, 163, 0.06);
}

.app-menu-card .ghost-button.full-width {
  color: var(--accent);
  background: rgba(236, 241, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(28, 48, 163, 0.14),
    0 8px 18px rgba(28, 48, 163, 0.06);
}

.menu-link.active,
.menu-toggle-button[aria-expanded="true"] {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.shell-menu-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
}

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

.menu-substack {
  display: grid;
  gap: 8px;
  padding-left: 10px;
}

.menu-substack[hidden] {
  display: none !important;
}

.page-stack {
  display: grid;
}

.screen {
  display: grid;
  gap: 16px;
}

.screen-head {
  justify-content: space-between;
  align-items: end;
}

.screen-head h3,
.panel-head h4 {
  margin: 0;
}

.screen-head h3 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.95;
}

.panel-head {
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.stat-row,
.grid-two,
.chip-grid {
  display: grid;
  gap: 16px;
}

.stat-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.grid-two.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  padding: 20px;
  border-color: rgba(28, 48, 163, 0.1);
  background: rgba(236, 241, 255, 0.94);
  box-shadow: 0 16px 32px rgba(28, 48, 163, 0.07);
}

.panel-muted {
  background: rgba(230, 237, 255, 0.96);
}

.stat-card,
.list-card,
.wallet-hero,
.preview-box,
.locked-state {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(28, 48, 163, 0.11);
  border-radius: 20px;
}

.stat-card {
  padding: 18px;
}

.stat-card span,
.item-chip {
  font-size: 0.7rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.stat-card p {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.list-stack,
.stack-column,
.chip-grid,
.badge-row {
  display: grid;
  gap: 12px;
}

.list-card {
  padding: 16px;
}

.list-topline,
.wallet-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list-title,
.wallet-hero h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
}

.list-meta {
  margin-top: 6px;
  font-size: 0.9rem;
}

.list-note {
  margin-top: 10px;
  font-size: 0.88rem;
}

.list-value {
  font-size: 1.45rem;
  line-height: 1;
}

.list-card.active {
  border-color: rgba(28, 48, 163, 0.24);
  box-shadow: 0 12px 24px rgba(28, 48, 163, 0.08);
}

.wallet-layout {
  align-items: start;
}

.wallet-hero {
  padding: 18px;
  margin-bottom: 14px;
}

.wallet-amount {
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.92;
}

.wallet-note {
  margin-top: 8px;
  font-size: 0.92rem;
}

.auction-countdown-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  min-height: 168px;
  align-content: center;
}

.auction-date-label {
  color: var(--ink);
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.92;
  text-transform: uppercase;
}

.auction-date-line {
  color: var(--ink);
  font-size: clamp(1.05rem, 2.3vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.auction-countdown-value {
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.95;
  font-weight: 900;
}

.auction-countdown-value[data-live="true"] {
  color: var(--accent);
}

.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.item-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 14px;
  border-radius: 16px;
}

.item-chip.active {
  color: var(--accent);
  background: rgba(28, 48, 163, 0.08);
}

.item-chip.inactive {
  color: var(--danger);
  background: rgba(179, 71, 45, 0.08);
}

.item-chip.soft {
  color: var(--accent);
  background: rgba(28, 48, 163, 0.08);
}

.preview-box,
.locked-state {
  font-size: 0.95rem;
}

.form-top-space {
  margin-top: 16px;
}

.badge-row {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: start;
  gap: 8px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action-button.danger {
  color: var(--danger);
  background: rgba(179, 71, 45, 0.08);
}

.action-button.soft {
  color: var(--accent);
  background: rgba(28, 48, 163, 0.08);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

@media (max-width: 980px) {
  .auth-shell,
  .grid-two,
  .field-row.two-up {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-root {
    width: min(100vw - 18px, 100%);
    max-width: 100%;
    overflow-x: hidden;
    padding-top: 12px;
  }

  .auth-brand,
  .auth-card,
  .panel,
  .app-header,
  .app-nav {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-brand h1 {
    max-width: none;
  }

  .app-header,
  .screen-head,
  .panel-head,
  .list-topline,
  .wallet-topline,
  .split-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }

  .shell-menu-toggle {
    top: 18px;
    right: 18px;
  }

  .app-menu {
    justify-content: stretch;
  }

  .app-menu-card {
    width: 100%;
  }

  .nav-row {
    overflow: auto;
    padding-bottom: 2px;
  }

  #appShell[data-current-role="employee"],
  #appShell[data-current-role="employee"] .screen,
  #appShell[data-current-role="employee"] .grid-two,
  #appShell[data-current-role="employee"] .stat-row,
  #appShell[data-current-role="employee"] .panel,
  #appShell[data-current-role="employee"] .stat-card,
  #appShell[data-current-role="employee"] .list-card {
    max-width: 100%;
    min-width: 0;
  }

  #appShell[data-current-role="employee"] [data-screen="home"] #homeStats {
    grid-template-columns: minmax(0, 1fr);
  }

  #appShell[data-current-role="employee"] .employee-balance-card {
    overflow: hidden;
    text-align: left;
  }

  #appShell[data-current-role="employee"] .employee-balance-card strong {
    font-size: clamp(3.2rem, 17vw, 4.8rem);
  }

  #appShell[data-current-role="employee"] .list-meta,
  #appShell[data-current-role="employee"] .list-note,
  #appShell[data-current-role="employee"] .preview-box,
  #appShell[data-current-role="employee"] .locked-state {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #appShell[data-current-role="employee"] #auctionOverviewGrid {
    gap: 0;
  }

  #appShell[data-current-role="employee"] .auction-countdown-card {
    min-height: 260px;
    gap: 10px;
    padding: 8px 0;
  }

  #appShell[data-current-role="employee"] .auction-date-label {
    font-size: clamp(2.35rem, 12vw, 3.65rem);
  }

  #appShell[data-current-role="employee"] .auction-date-line {
    font-size: clamp(1.15rem, 6vw, 1.75rem);
  }

  #appShell[data-current-role="employee"] #auctionCountdownValue {
    padding: 12px 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: clamp(2.75rem, 13vw, 4.4rem);
  }

  #appShell[data-current-role="employee"] #auctionAnnouncement {
    width: 100%;
    margin-top: 6px;
    text-align: center;
  }
}
