:root {
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --border: #cfd6df;
  --border-soft: #dfe5ec;
  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;
  --green: #58bd37;
  --green-ink: #197546;
  --green-bg: #ddf7e7;
  --red: #d52832;
  --red-bg: #ffe0e2;
  --orange: #ff7618;
  --blue: #1f80ff;
  --shadow: 0 1px 3px rgba(20, 30, 45, 0.08);
  --audit-primary: #111827;
  --audit-secondary: #374151;
  --audit-meta: #64748b;
  --audit-subtle: #94a3b8;
  --audit-label-size: 12px;
  --audit-body-size: 15px;
  --audit-value-size: 17px;
  --audit-title-size: 20px;
  --ui-primary: #465365;
  --ui-secondary: #344255;
  --ui-meta: #56677d;
  --ui-border: #c3ccd8;
  --ui-divider: #d9e1ea;
  --ui-shadow-soft: 0 1px 2px rgba(20, 30, 45, 0.05);
  --ui-danger-pill-size: 15px;
  --ui-danger-pill-weight: 900;
  --ui-danger-pill-line: 24px;
  --ui-danger-pill-padding-x: 12px;
  --ui-compact-row-height: 42px;
  --ui-row-primary-size: 15px;
  --ui-row-meta-size: 13px;
  --ui-secondary-row-weight: 700;
  --ui-overview-pill-weight: 800;
  --ui-overview-pill-line: 20px;
  --ui-overview-pill-padding-x: 9px;
  --ui-overview-signon-row-height: 34px;
  --ui-overview-audit-row-height: 40px;
  --ui-hover-bg: #f1f7fd;
  --ui-hover-ring: rgba(157, 183, 212, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  background: var(--canvas);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e4e8ed;
  background: rgba(255, 255, 255, 0.92);
  padding: 22px 12px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 18px;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px 7px 10px 7px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  line-height: 1;
}

.store-switcher {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  background: #f7f8f9;
  color: var(--text);
  padding: 8px;
  text-align: left;
}

.store-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    linear-gradient(#214f9f 0 36%, #fff 36% 52%, #e1242a 52%),
    #214f9f;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.store-switcher strong,
.consultant strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-switcher small,
.consultant small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: var(--faint);
  font-size: 15px;
  transform: rotate(90deg);
}

.chevron.up {
  transform: rotate(-90deg);
}

.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 22px;
  padding-top: 24px;
}

.main-nav h2 {
  margin: 0 0 7px;
  color: #8a94a4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-item {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-radius: 6px;
  color: #202b3a;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 7px;
}

.nav-item.is-active {
  background: #f6f7f9;
}

.nav-copy {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-copy > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1.5px solid #a7afbc;
  border-radius: 2px;
  position: relative;
}

.nav-icon-box::after,
.nav-icon-grid::before,
.nav-icon-receipt::after,
.nav-icon-menu::after,
.nav-icon-report::after,
.nav-icon-users::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-top: 1.5px solid #a7afbc;
  border-bottom: 1.5px solid #a7afbc;
}

.nav-icon-screen {
  border-radius: 2px 2px 4px 4px;
}

.nav-icon-screen::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  border-bottom: 1.5px solid #a7afbc;
}

.nav-icon-ban {
  border-radius: 50%;
}

.nav-icon-ban::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  width: 9px;
  border-top: 1.5px solid #a7afbc;
  transform: rotate(45deg);
}

.nav-icon-check {
  border-radius: 3px;
}

.nav-icon-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 5px;
  height: 8px;
  border-right: 1.5px solid #a7afbc;
  border-bottom: 1.5px solid #a7afbc;
  transform: rotate(40deg);
}

.nav-icon-account,
.nav-icon-users,
.nav-icon-help {
  border-radius: 50%;
}

.mini-badge {
  max-width: 64px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid #d7dde4;
  color: #6e7785;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  padding: 0 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-badge.danger {
  border-color: #ffc9ce;
  background: #ffe7e9;
  color: var(--red);
}

.mini-badge.success {
  border-color: #bceccf;
  background: #e5f8eb;
  color: var(--green-ink);
}

.sidebar-footer {
  display: grid;
  gap: 4px;
}

.consultant {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  text-align: left;
}

.avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #fee0d5, #d7ecff);
  color: #774c4b;
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  min-width: 0;
  max-width: 880px;
  width: calc(100% - 44px);
  margin: 0 auto;
  padding: 28px 0 76px;
}

.topbar {
  height: 22px;
  display: flex;
  align-items: center;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #526174;
  font-size: 13px;
  font-weight: 700;
}

.breadcrumbs strong {
  color: #202936;
  font-weight: 700;
}

.home-icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  border: 1.5px solid #a0a8b5;
  border-top: 0;
  border-radius: 2px;
  position: relative;
  transform: translateY(2px);
}

.home-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid #a0a8b5;
  border-top: 1.5px solid #a0a8b5;
  transform: rotate(45deg);
}

.game-card,
.audit-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
}

.ticket-art {
  width: 66px;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-radius: 5px;
  border: 3px solid #079b87;
  background: linear-gradient(135deg, #fa1b40 0 50%, #0d315f 50%);
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.ticket-art span {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffe66e 0 30%, #f27f20 32% 55%, #124a7f 57%);
}

.queen-card .ticket-art {
  display: block;
  border: 0;
  border-radius: 5px;
  background: #ed1b80;
  object-fit: cover;
  object-position: top center;
  padding: 0;
}

.game-copy h1 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.queen-card h1 {
  font-size: 29px;
  line-height: 1;
  text-transform: uppercase;
}

.queen-card h1 span {
  color: #4b5563;
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
}

.game-copy p {
  margin: 7px 0 0;
  color: #374151;
  font-size: 15px;
  font-weight: 800;
}

.export-button,
.date-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.export-button {
  min-width: 82px;
  min-height: 36px;
  padding: 0 13px;
}

.export-icon {
  width: 12px;
  height: 12px;
  border: 1.5px solid #a8b0bc;
  border-radius: 2px;
  position: relative;
}

.export-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -4px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid #a8b0bc;
  border-right: 1.5px solid #a8b0bc;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 24px;
}

.segments {
  display: inline-flex;
  gap: 17px;
  align-items: center;
}

.segments button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.segments .selected {
  background: #f1faec;
  color: #3b9e22;
}

.display-controls .segments {
  gap: 3px;
  border-radius: 999px;
  background: #eef1f5;
  padding: 2px;
}

.display-controls .segments button {
  min-width: 76px;
  border-radius: 999px;
  padding: 8px 14px;
}

.display-controls .segments .selected {
  border: 1px solid #cdd4de;
  background: #fff;
  color: #151d2a;
  box-shadow: 0 1px 2px rgba(20, 30, 45, 0.08);
}

.date-button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.calendar-icon {
  width: 12px;
  height: 12px;
  border: 1.5px solid #8f99a7;
  border-radius: 2px;
  position: relative;
}

.calendar-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  border-top: 1.5px solid #8f99a7;
}

.chevron-down {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #7d8795;
  border-bottom: 1.5px solid #7d8795;
  transform: rotate(45deg) translateY(-2px);
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-with-rail {
  position: relative;
  gap: 6px;
  padding-left: 0;
}

.timeline > h2 {
  margin: 18px 0 6px;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.show-more {
  justify-self: start;
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #66727d;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  min-height: 31px;
  padding: 0 10px;
}

.show-more::before {
  content: "^ ";
  color: #fff;
}

.audit-card {
  min-height: 56px;
  padding: 0;
}

.display-audit {
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.audit-card-main {
  min-height: 55px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
}

.display-audit .audit-card-main {
  grid-template-columns: 30px minmax(0, 1fr) 118px;
  align-items: start;
  min-height: 48px;
  padding: 12px 14px 4px;
}

.event-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.display-icon {
  border-radius: 50%;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

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

.status-dot.green {
  background: #12a99d;
}

.audit-copy {
  min-width: 0;
}

.audit-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.audit-title-row h3 {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  max-width: 210px;
  overflow: hidden;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  padding: 0 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip.bad {
  background: var(--red-bg);
  color: var(--red);
}

.status-chip.good {
  background: var(--green-bg);
  color: var(--green-ink);
}

.display-audit .status-chip.good {
  background: transparent;
  color: #138f5f;
  font-size: 18px;
  line-height: 18px;
  padding: 0;
}

.edit-pencil {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  position: relative;
  transform: rotate(-45deg);
}

.edit-pencil::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 2px;
  height: 10px;
  border-radius: 2px;
  background: #1977ff;
}

.edit-pencil::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #1977ff;
}

.audit-copy p,
.audit-meta {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.audit-card time,
.pack-event time {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.audit-expanded {
  margin: -3px 13px 13px 30px;
}

.display-audit .audit-expanded {
  margin: 0 14px 14px 58px;
}

.audit-table-only {
  border-top: 1px dashed #cdd6e2;
  padding-top: 4px;
}

.audit-expanded details {
  margin-top: 9px;
}

details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

.audit-expanded summary,
.employee-log summary,
.plain-event summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #1d73e8;
  font-size: 10px;
  font-weight: 800;
}

.audit-expanded summary::after,
.employee-log summary::after,
.plain-event summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-135deg) translateY(-1px);
}

details:not([open]) summary::after {
  transform: rotate(45deg) translateY(-2px);
}

.discrepancy-table {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.table-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  align-items: center;
  border-top: 1px solid var(--border-soft);
  padding: 0 13px;
}

.ticket-table .table-row {
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 34px;
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  min-height: 31px;
  background: var(--surface-subtle);
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.table-row a,
.table-row strong {
  font-size: 14px;
  font-weight: 800;
}

.table-row a {
  color: #1d73e8;
}

.table-row strong {
  color: var(--red);
}

.ticket-table .table-row span[role="cell"] {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.inline-event {
  min-height: 44px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  background: #fff;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 14px 8px 7px;
  box-shadow: var(--shadow);
}

.inline-event time {
  color: #5b6b82;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.pack-activation {
  grid-template-columns: 84px 26px minmax(0, 1fr);
  color: #111827;
  font-weight: 800;
}

.pack-activation a {
  color: #006bff;
}

.pack-token {
  width: 34px;
  height: 34px;
  display: block;
  border: 2px solid #d4dbe4;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  padding: 4px;
  box-shadow: 0 0 0 3px #fff;
}

.sales-stack {
  display: grid;
  gap: 7px;
}

.sales-group {
  display: grid;
  gap: 7px;
}

.sales-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 12px;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  padding: 13px 14px;
  box-shadow: var(--shadow);
}

.sale-event:not(.sales-summary-event) .sales-card {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 14px;
}

.sales-group-summary {
  width: 100%;
  grid-template-columns: 28px minmax(0, 1fr) 146px 24px;
  cursor: pointer;
  text-align: left;
}

.sales-group-summary:hover {
  border-color: #9ca8b6;
  background: #fbfcfd;
}

.sales-group.is-expanded .sales-group-summary {
  min-height: 56px;
  border-color: #c4ccd7;
  border-style: dashed;
  background: #f7f9fb;
  box-shadow: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

.sales-group.is-expanded .sales-summary-event .event-time {
  color: #6b7280;
}

.sales-group.is-expanded .sales-summary-event .sales-dot {
  background: #bbf7d0;
}

.sales-group.is-expanded .sales-group-summary .sales-copy {
  gap: 4px;
}

.sales-group.is-expanded .sales-group-summary .sales-copy strong {
  color: #374151;
  font-size: 15px;
}

.sales-group.is-expanded .sales-group-summary .sales-copy span {
  color: #5f6b7a;
  font-size: 13px;
}

.sales-group-summary:focus-visible {
  outline: 3px solid rgba(31, 128, 255, 0.28);
  outline-offset: 2px;
}

.sales-group-items {
  padding-left: 40px;
  position: relative;
}

.sales-group-items::before {
  content: "";
  position: absolute;
  top: -4px;
  bottom: 8px;
  left: 12px;
  border-left: 2px solid #cfd6df;
}

.sales-dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #dff6e7;
  box-shadow: 0 0 0 2px #d4dbe4;
}

.sales-dot::before {
  content: "$";
  color: #197546;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

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

.sales-copy strong {
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.sales-copy span {
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-meta {
  color: #4b5563;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.sale-event:not(.sales-summary-event) .sales-copy {
  display: block;
}

.sale-event:not(.sales-summary-event) .sales-copy strong {
  font-size: 16px;
}

.sales-card time {
  color: #5b6b82;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.group-chevron {
  width: 11px;
  height: 11px;
  justify-self: center;
  border-right: 2px solid #4b5563;
  border-bottom: 2px solid #4b5563;
  transform: rotate(45deg) translateY(-2px);
}

.sales-group.is-expanded .group-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 76px 28px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.timeline-page .audit-event + .employee-event,
.timeline-page .audit-event + .activation-event,
.timeline-page .activation-event + .sales-group,
.timeline-page .employee-event + .sales-group,
.timeline-page .employee-event + .audit-event,
.timeline-page .activation-event + .audit-event {
  margin-top: 4px;
}

.timeline-event::before {
  content: "";
  position: absolute;
  top: -9px;
  bottom: -12px;
  left: 97px;
  border-left: 2px solid #aeb8c5;
  z-index: 0;
}

.timeline-event:first-of-type::before {
  top: 18px;
}

.event-time {
  color: #4a5c74;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.22;
  padding-top: 18px;
  text-align: left;
  white-space: nowrap;
}

.time-range {
  display: grid;
  gap: 4px;
  justify-items: start;
  line-height: 1.05;
}

.time-range span {
  font-size: 12px;
  white-space: nowrap;
}

.sales-summary-event .event-time {
  padding-top: 14px;
}

.event-marker {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 15px;
}

.event-content {
  min-width: 0;
}

.rail-dot {
  width: 12px;
  height: 12px;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #6f7d8e;
  box-shadow: 0 0 0 2px #d4dbe4;
}

.timeline-audit-dot {
  width: 16px;
  height: 16px;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #d4dbe4;
}

.timeline-audit-dot.display {
  background: var(--teal);
}

.event-icon,
.pack-token,
.sales-dot {
  position: relative;
  z-index: 1;
}

.employee-event .event-marker,
.activation-event .event-marker {
  padding-top: 16px;
}

.pack-token {
  width: 24px;
  height: 24px;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #fff7dc;
  box-shadow: 0 0 0 2px #d4dbe4;
  object-fit: contain;
  padding: 3px;
}

.display-audit .audit-card-main {
  grid-template-columns: minmax(0, 1fr);
  min-height: 48px;
  padding: 14px 16px 5px;
}

.display-audit .audit-expanded {
  margin: 0 16px 8px;
}

.inline-event {
  grid-template-columns: minmax(0, 1fr);
  min-height: 50px;
  padding: 12px 16px;
}

.pack-activation {
  grid-template-columns: minmax(0, 1fr);
}

.sales-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 72px;
}

.sale-event:not(.sales-summary-event) .sales-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 48px;
}

.sales-group-summary {
  grid-template-columns: minmax(0, 1fr) 24px;
}

.sales-group-items {
  padding-left: 0;
}

.sales-group-items::before {
  display: none;
}

.plain-event,
.employee-log {
  margin-left: 18px;
}

.plain-event summary,
.employee-log summary {
  color: #6e7887;
}

.employee-log {
  margin-top: 3px;
}

.employee-log summary {
  color: #1d73e8;
}

.employee-log div {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-left: 1px;
}

.employee-log p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: #697486;
  font-size: 10px;
  font-weight: 600;
}

.employee-log time {
  color: #8993a2;
}

.employee-log span {
  min-width: 0;
}

.pack-event {
  min-height: 28px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  color: #6d7787;
  font-size: 10px;
  font-weight: 600;
}

.bottom-event {
  margin-top: 2px;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    display: block;
    padding: 12px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .main-nav,
  .sidebar-footer {
    display: none;
  }

  .workspace {
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

}

@media (max-width: 560px) {
  .game-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .ticket-art {
    width: 58px;
    height: 58px;
  }

  .queen-card h1 {
    font-size: 22px;
    line-height: 1.08;
  }

  .export-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .controls {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .segments {
    justify-content: space-between;
  }

  .date-button {
    align-self: flex-start;
  }

  .timeline-event {
    grid-template-columns: 64px 30px minmax(0, 1fr);
    gap: 7px;
  }

  .timeline-event::before {
    left: 86px;
  }

  .event-time {
    font-size: 11px;
    padding-top: 16px;
  }

  .event-marker {
    padding-top: 13px;
  }

  .audit-card-main,
  .display-audit .audit-card-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .status-chip {
    max-width: 100%;
  }

  .audit-expanded {
    margin-left: 22px;
  }

  .display-audit .audit-expanded {
    margin-left: 14px;
  }

  .table-row {
    grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.2fr);
  }

  .inline-event,
  .pack-activation {
    grid-template-columns: minmax(0, 1fr);
  }

  .pack-token {
    display: block;
    width: 30px;
    height: 30px;
    padding: 4px;
  }

  .sales-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-group-summary {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .sales-group-summary .group-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .sales-group-items {
    padding-left: 0;
  }

  .employee-log p {
    grid-template-columns: 56px minmax(0, 1fr);
  }

}

/* Comparison audit overview styles */

:root {
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --border: #cfd6df;
  --border-soft: #e2e7ee;
  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;
  --green: #159163;
  --green-bg: #ddf7e7;
  --red: #c7242d;
  --red-bg: #ffe0e2;
  --yellow: #ffc91f;
  --yellow-border: #dca500;
  --teal: #2563eb;
  --teal-bg: #eff6ff;
  --orange: #f97316;
  --orange-bg: #fff7ed;
  --vending: #7c3aed;
  --vending-bg: #f5f3ff;
  --blue: #1f80ff;
  --shadow: 0 1px 3px rgba(20, 30, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.audit-page {
  min-height: 100vh;
  background: var(--canvas);
  --audit-sales-col: 128px;
  --audit-variance-col: 152px;
}

.app-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 28px;
}

.crumbs,
.top-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
}

.crumbs {
  gap: 9px;
  color: var(--audit-meta);
  font-size: var(--audit-body-size);
  font-weight: 700;
}

.crumbs strong {
  color: var(--audit-primary);
  font-size: var(--audit-body-size);
  font-weight: 800;
}

.icon-button,
.pill-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--audit-primary);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.menu-button {
  margin-right: 8px;
}

.pill-button {
  min-height: 40px;
  gap: 9px;
  border-radius: 999px;
  font-size: var(--audit-body-size);
  padding: 0 15px;
}

.top-actions {
  gap: 10px;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: inline-block;
  position: relative;
}

.ui-icon-menu,
.ui-icon-menu::before,
.ui-icon-menu::after {
  height: 2px;
  border-radius: 999px;
  background: var(--faint);
}

.ui-icon-menu {
  width: 20px;
}

.ui-icon-menu::before,
.ui-icon-menu::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
}

.ui-icon-menu::before {
  top: -6px;
}

.ui-icon-menu::after {
  top: 6px;
}

.ui-icon-calendar {
  border: 2px solid #7d8da3;
  border-radius: 3px;
}

.ui-icon-calendar::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  border-top: 2px solid #7d8da3;
}

.ui-icon-tools::before,
.ui-icon-tools::after {
  content: "";
  position: absolute;
  left: 7px;
  top: -1px;
  width: 3px;
  height: 19px;
  border-radius: 999px;
  background: #53627a;
}

.ui-icon-tools::before {
  transform: rotate(45deg);
}

.ui-icon-tools::after {
  transform: rotate(-45deg);
}

.ui-icon-download {
  border-bottom: 3px solid var(--text);
}

.ui-icon-download::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 3px;
  height: 11px;
  background: var(--text);
}

.ui-icon-download::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-right: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  transform: rotate(45deg);
}

.ui-icon-qr {
  background:
    linear-gradient(#53627a 0 0) 0 0 / 5px 5px,
    linear-gradient(#53627a 0 0) 8px 0 / 4px 4px,
    linear-gradient(#53627a 0 0) 13px 0 / 4px 4px,
    linear-gradient(#53627a 0 0) 0 8px / 4px 4px,
    linear-gradient(#53627a 0 0) 8px 8px / 5px 5px,
    linear-gradient(#53627a 0 0) 14px 10px / 3px 3px,
    linear-gradient(#53627a 0 0) 0 14px / 5px 5px,
    linear-gradient(#53627a 0 0) 11px 15px / 4px 4px;
  background-repeat: no-repeat;
}

.audits-card {
  width: min(100% - 56px, 1240px);
  margin: 8px auto 64px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.audit-page-title {
  width: min(100% - 56px, 1240px);
  margin: 26px auto 0;
  color: var(--overview-primary);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.card-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-bottom: 1px solid var(--border-soft);
  background: #fff;
  padding: 0 20px;
}

.card-toolbar h1 {
  margin: 0;
  color: var(--audit-primary);
  font-size: var(--audit-label-size);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.toolbar-actions {
  gap: 10px;
}

.outline-button {
  min-height: 38px;
  gap: 8px;
  font-size: 14px;
  padding: 0 13px;
}

.export-action {
  min-width: 104px;
}

.tiny-caret {
  width: 0;
  height: 0;
  display: inline-block;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--faint);
}

.row-caret {
  border-top-color: #64748b;
  flex: 0 0 auto;
  margin-left: 2px;
  transform-origin: 50% 45%;
  transition: transform 160ms ease;
}

.audit-day.is-expanded .row-caret {
  transform: rotate(180deg);
}

.audit-header,
.audit-row,
.total-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
  align-items: center;
}

.audit-header {
  min-height: 54px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--audit-meta);
  font-size: var(--audit-label-size);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 20px;
}

.audit-header span:nth-child(n + 3) {
  display: flex;
  justify-content: center;
}

.audit-day {
  border-bottom: 1px solid var(--border-soft);
}

.audit-day:last-child {
  border-bottom: 0;
}

.audit-row {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: #fff;
  color: var(--audit-primary);
  padding: 0 20px;
  text-align: left;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.audit-day.is-expanded .audit-row {
  background: #fbfcfd;
}

.audit-day.is-expanded .audit-row {
  box-shadow: inset 0 -1px 0 #cbd8e5;
}

.audit-row:hover {
  background: #edf5fc;
  box-shadow: inset 0 0 0 1px rgba(139, 166, 195, 0.45);
}

.audit-row:hover .row-caret {
  border-top-color: #334155;
}

.date-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.date-cell > strong {
  color: var(--audit-primary);
  font-size: var(--audit-title-size);
  font-weight: 800;
  white-space: nowrap;
}

.scope-list {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.scope-list > span:not(.tiny-caret) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--audit-meta);
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  padding: 0 10px;
}

.sales-cell {
  color: var(--audit-primary);
  font-size: var(--audit-value-size);
  font-weight: 800;
}

.variance-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.variance-empty {
  color: var(--overview-meta);
  font-size: var(--overview-body);
  font-weight: 800;
}

.variance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: var(--ui-danger-pill-size);
  font-weight: var(--ui-danger-pill-weight);
  line-height: var(--ui-danger-pill-line);
  padding: 0 var(--ui-danger-pill-padding-x);
}

.variance-pill.bad {
  background: var(--red);
}

.variance-pill.warn {
  border: 2px solid var(--yellow-border);
  background: var(--yellow);
  color: var(--audit-primary);
}

.status-check {
  width: 22px;
  height: 14px;
  display: inline-block;
  border-left: 5px solid var(--green);
  border-bottom: 5px solid var(--green);
  transform: rotate(-45deg);
}

.day-details {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--border-soft);
  background: #f3f8fc;
  padding: 10px 20px 12px;
}

.day-event {
  min-height: 46px;
  display: grid;
  grid-template-columns: 86px 32px minmax(0, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
  align-items: center;
  column-gap: 8px;
  position: relative;
}

.day-event::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 109px;
  border-left: 2px solid #d4dbe4;
}

.day-event:first-child::before {
  top: 20px;
}

.day-event:last-child::before {
  bottom: 20px;
}

.day-rail {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-time {
  color: var(--overview-meta);
  font-size: var(--overview-body);
  font-weight: 700;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}

.event-dot {
  width: 12px;
  height: 12px;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #6f7d8e;
  box-shadow: 0 0 0 2px #d4dbe4;
}

.event-dot.audit {
  width: 16px;
  height: 16px;
  border-width: 3px;
}

.audit-scan-icon {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 50%;
}

.event-dot.backstock {
  background: var(--orange);
}

.event-dot.display {
  background: var(--teal);
}

.event-dot.vending {
  background: var(--vending);
}

.event-line {
  min-width: 0;
  min-height: 46px;
  display: grid;
  grid-column: 3 / -1;
  grid-template-columns: minmax(0, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
  align-items: center;
  column-gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: #fff;
  color: #263445;
  font-size: var(--audit-body-size);
  font-weight: 700;
  padding: 0 0 0 14px;
  box-shadow: var(--shadow);
}

.audit-event .event-line {
  border-color: #d4e2ee;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.audit-event .event-line strong {
  color: var(--audit-primary);
}

.audit-event .event-line:hover {
  border-color: #9db7d4;
  background: #f8fbff;
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px #c7d7e8;
}

.audit-event .event-line:hover .row-chevron {
  border-color: #64748b;
}

.signon-event .event-line {
  border-color: #d7e0ea;
  color: var(--overview-meta);
}

.event-main {
  min-width: 0;
  display: flex;
  grid-column: 1 / span 2;
  align-items: center;
  gap: 8px;
}

.event-line strong {
  color: var(--audit-primary);
  font-weight: 800;
}

.event-time {
  color: var(--audit-meta);
  font-size: var(--audit-body-size);
  font-weight: 700;
  white-space: nowrap;
}

.event-separator {
  color: var(--audit-subtle);
  font-weight: 700;
}

.scope-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  padding: 0 10px;
}

.scope-badge.backstock {
  border: 1.5px solid #cbd6e2;
  background: #fff;
  color: var(--overview-secondary);
}

.scope-badge.display {
  border: 1.5px solid #cbd6e2;
  background: #fff;
  color: var(--overview-secondary);
}

.scope-badge.vending {
  border: 1.5px solid #cbd6e2;
  background: #fff;
  color: var(--overview-secondary);
}

.scope-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.scope-badge.backstock::before {
  background: var(--orange);
}

.scope-badge.display::before {
  background: var(--teal);
}

.scope-badge.vending::before {
  background: var(--vending);
}

.row-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #c7d0dc;
  border-bottom: 2px solid #c7d0dc;
  transform: rotate(-45deg);
}

.event-variance {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
}

.event-variance.display {
  grid-column: 3;
}

.event-variance.backstock {
  grid-column: 4;
}

.event-variance.vending {
  grid-column: 5;
}

.opened-event {
  min-height: 54px;
  margin-top: 0;
}

.opened-event::before {
  display: none;
}

.opened-event .event-line {
  min-height: 54px;
  border-color: var(--border-soft);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0 0 0 14px;
}

.opened-time {
  color: var(--audit-meta);
  display: grid;
  gap: 2px;
  justify-items: start;
}

.sun-icon {
  width: 22px;
  height: 22px;
  display: block;
  border: 4px solid #ffecaf;
  border-radius: 50%;
  background: #d99a00;
  box-shadow: 0 0 0 4px #fff7dc;
}

.total-row {
  min-height: 58px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--audit-primary);
  font-size: var(--audit-value-size);
  font-weight: 800;
  padding: 0 20px;
}

.total-row strong:nth-child(n + 3) {
  display: flex;
  justify-content: center;
}

.chat-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #6ec945;
  box-shadow: 0 12px 26px rgba(31, 45, 64, 0.22);
}

.chat-button span {
  width: 30px;
  height: 22px;
  display: block;
  border: 3px solid #fff;
  border-radius: 6px;
  position: relative;
}

.chat-button span::before {
  content: "";
  position: absolute;
  right: -8px;
  top: -8px;
  width: 20px;
  height: 15px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  border-radius: 4px;
}

.chat-button span::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -9px;
  width: 9px;
  height: 9px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: skew(-20deg);
}

@media (max-width: 980px) {
  .audit-page {
    --audit-sales-col: 120px;
    --audit-variance-col: 118px;
  }

  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .top-actions,
  .toolbar-actions {
    flex-wrap: wrap;
  }

  .audits-card {
    width: calc(100% - 24px);
    margin-top: 8px;
  }

  .card-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 20px;
  }

  .audit-header,
  .audit-row,
  .total-row {
    grid-template-columns: minmax(260px, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
  }
}

@media (max-width: 700px) {
  .audit-header {
    display: none;
  }

  .audit-row,
  .total-row {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 16px;
  }

  .date-cell {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .sales-cell,
  .variance-cell,
  .total-row strong:nth-child(n + 3) {
    justify-content: flex-start;
  }

  .day-details {
    padding: 14px 14px 16px;
  }

  .day-event {
    grid-template-columns: 72px 28px minmax(0, 1fr);
    column-gap: 7px;
  }

  .day-event::before {
    left: 86px;
  }

  .detail-time {
    font-size: 12px;
  }

  .event-line {
    align-items: center;
    grid-column: 3;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
  }

  .event-main,
  .event-variance {
    grid-column: 1;
  }

  .event-variance {
    justify-content: flex-start;
    padding-top: 4px;
  }
}

.compare-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 16px;
  backdrop-filter: blur(10px);
}

.compare-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--audit-meta);
  font-size: 14px;
  font-weight: 800;
  padding: 0 18px;
}

.compare-tabs a.active {
  border-color: var(--border);
  background: #fff;
  color: var(--audit-primary);
  box-shadow: var(--shadow);
}

/* Reversible Timeline/Overview visual matching pass. */
.timeline-page.shell {
  grid-template-columns: minmax(0, 1fr);
}

.timeline-page {
  --timeline-primary: var(--ui-primary);
  color: var(--timeline-primary);
}

.timeline-page .audit-card,
.timeline-page .inline-event,
.timeline-page .sales-card {
  border: 1px solid #cfd6df;
  box-shadow: var(--shadow);
}

.timeline-page .audit-card {
  background: #fff;
}

.timeline-page .audit-title-row {
  gap: 9px;
}

.timeline-page .audit-title-row h3,
.timeline-page .sales-copy strong,
.timeline-page .pack-activation strong,
.timeline-page .inline-event span {
  color: var(--timeline-primary);
  font-size: 15px;
  font-weight: 800;
}

.timeline-page .inline-event {
  color: var(--timeline-primary);
  font-size: 15px;
  font-weight: 800;
}

.timeline-page .employee-event .inline-event span {
  color: var(--ui-meta);
  font-size: 13px;
  font-weight: 900;
}

.timeline-page .employee-event .inline-event {
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.timeline-page .employee-event .event-time,
.timeline-page .employee-event .event-marker {
  padding-top: 0;
}

.timeline-page .employee-event {
  align-items: center;
}

.timeline-page .employee-event .rail-dot {
  display: none;
}

.timeline-page .activation-event .inline-event {
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.timeline-page .activation-event .pack-activation strong {
  color: var(--ui-meta);
  font-size: 13px;
  font-weight: 900;
}

.timeline-page .breadcrumbs strong,
.timeline-page .game-copy h1,
.timeline-page .game-copy p,
.timeline-page .segments button,
.timeline-page .export-button,
.timeline-page .date-button,
.timeline-page .timeline > h2 {
  color: var(--timeline-primary);
}

.timeline-page .sales-meta,
.timeline-page .sales-copy span {
  color: var(--ui-meta);
  font-size: var(--ui-row-meta-size);
  font-weight: var(--ui-secondary-row-weight);
}

.timeline-page .sale-event:not(.sales-summary-event) .sales-copy strong {
  color: var(--ui-primary);
  font-size: 14px;
  font-weight: 700;
}

.timeline-page .sale-event:not(.sales-summary-event) .sales-meta {
  color: var(--ui-meta);
  font-size: var(--ui-row-meta-size);
  font-weight: var(--ui-secondary-row-weight);
}

.timeline-page .status-chip {
  font-weight: 800;
}

.timeline-page .discrepancy-table {
  border-color: #cfd6df;
}

.timeline-page .table-head {
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.timeline-page .ticket-table .table-row {
  min-height: 38px;
}

.timeline-page .table-row a,
.timeline-page .table-row strong,
.timeline-page .ticket-table .table-row span[role="cell"] {
  font-size: 14px;
  font-weight: 800;
}

.timeline-page .table-row strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.timeline-page .event-time {
  font-size: 13px;
}

.timeline-page .time-range span {
  font-size: 12px;
}

.timeline-page .status-chip {
  font-size: 12px;
  line-height: 20px;
}

.timeline-page .status-chip.bad {
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: var(--ui-overview-pill-weight);
  line-height: 16px;
  padding: 0 7px;
}

.timeline-page .sale-event:not(.sales-summary-event) .sales-card {
  border-color: #cfd6df;
}

.timeline-page .overview-match-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.timeline-page .display-audit .status-chip.good {
  color: #159163;
}

.timeline-page .display-audit .audit-expanded {
  border-top-color: #d4e2ee;
  margin-bottom: 0;
}

/* Timeline event-card family refinement. */
.timeline-page .audit-card,
.timeline-page .sales-card {
  border-color: #c3ccd8;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(20, 30, 45, 0.08);
}

.timeline-page .audit-card {
  border-color: #b9c5d3;
}

.timeline-page .display-audit .audit-card-main,
.timeline-page .sales-card {
  padding-right: 16px;
  padding-left: 16px;
}

.timeline-page .display-audit .audit-card-main {
  min-height: 40px;
  padding-top: 9px;
  padding-bottom: 2px;
}

.timeline-page .sales-card {
  min-height: 56px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.timeline-page .sale-event:not(.sales-summary-event) .sales-card {
  min-height: 38px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.timeline-page .audit-event .event-marker {
  padding-top: 16px;
}

.timeline-page .activation-event .event-marker {
  padding-top: 0;
}

.timeline-page .activation-event .event-time {
  padding-top: 0;
}

.timeline-page .activation-event {
  align-items: center;
}

.timeline-page .sale-event:not(.sales-summary-event) .event-marker {
  padding-top: 9px;
}

.timeline-page .sale-event:not(.sales-summary-event) .event-time {
  padding-top: 13px;
}

.timeline-page .sales-summary-event .event-marker {
  padding-top: 16px;
}

.timeline-page .sales-summary-event::before {
  top: -48px;
}

.timeline-page .sales-summary-event .event-time {
  padding-top: 14px;
}

.timeline-page .sales-summary-event .sales-copy {
  gap: 2px;
}

.timeline-page .sales-summary-event .sales-copy strong,
.timeline-page .sales-summary-event .sales-copy span {
  line-height: 1.15;
}

.timeline-page .audit-table-only {
  border-top: 1px solid #d9e1ea;
  padding-top: 5px;
  padding-bottom: 5px;
}

.timeline-page .audit-detail-list {
  display: grid;
  gap: 0;
}

.timeline-page .audit-detail-row {
  min-height: 20px;
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 22px;
  border-top: 1px solid #e2e8f0;
  padding: 1px 0;
}

.timeline-page .audit-detail-row:first-child {
  border-top: 0;
}

.timeline-page .audit-detail-list:has(.audit-detail-row + .audit-detail-row) .audit-detail-row {
  min-height: 24px;
  padding-top: 2px;
  padding-bottom: 2px;
  border-top: 0;
}

.timeline-page .audit-detail-list:has(.audit-detail-row + .audit-detail-row) {
  gap: 1px;
}

.timeline-page .audit-detail-field {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 6px;
}

.timeline-page .audit-detail-label {
  color: var(--ui-meta);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-page .audit-detail-field a,
.timeline-page .audit-detail-field > span:last-child {
  color: var(--timeline-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.timeline-page .audit-detail-field a {
  color: #1d73e8;
}

.timeline-page .audit-detail-field .abnormal-cell {
  color: var(--red);
  font-weight: 900;
}

.timeline-page .ticket-table .table-row {
  min-height: 40px;
}

.timeline-page .ticket-table .table-row span[role="cell"] {
  color: var(--timeline-primary);
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.timeline-page .ticket-table .table-row .abnormal-cell {
  color: var(--red);
  font-weight: 900;
}

.timeline-page .status-chip.bad {
  letter-spacing: 0;
}

.timeline-page .sales-group-summary {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 28px;
  padding-right: 12px;
}

.timeline-page .sales-group.is-expanded .sales-group-summary {
  min-height: 50px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.timeline-page .sales-group-summary .group-chevron {
  justify-self: end;
}

.timeline-v2 .timeline-event {
  grid-template-columns: 116px 28px minmax(0, 1fr);
}

.timeline-v2 .timeline-event::before {
  left: 137px;
}

.timeline-v2 .event-time {
  padding-top: 12px;
  white-space: normal;
}

.timeline-v2 .event-stamp {
  color: var(--ui-meta);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.timeline-v2 .sales-stack-expanded {
  display: grid;
  gap: 4px;
}

.timeline-v2 .sale-event:not(.sales-summary-event) .sales-copy strong .voided-label {
  margin-left: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

/* Audit overview typography reset: keep the page on a tight, readable scale. */
.audit-page {
  --overview-label: 11px;
  --overview-body: 14px;
  --overview-key: 17px;
  --overview-primary: var(--ui-primary);
  --overview-secondary: var(--ui-secondary);
  --overview-meta: var(--ui-meta);
  --overview-soft: #94a3b8;
}

.audit-page .crumbs,
.audit-page .pill-button,
.audit-page .outline-button,
.audit-page .audit-row,
.audit-page .event-line,
.audit-page .total-row {
  letter-spacing: 0;
}

.audit-page .crumbs,
.audit-page .crumbs strong,
.audit-page .pill-button,
.audit-page .outline-button {
  font-size: var(--overview-body);
  font-weight: 700;
}

.audit-page .crumbs {
  color: var(--overview-meta);
}

.audit-page .crumbs strong,
.audit-page .pill-button,
.audit-page .outline-button {
  color: var(--overview-primary);
}

.audit-page .card-toolbar h1,
.audit-page .audit-header {
  color: var(--overview-meta);
  font-size: var(--overview-label);
  font-weight: 800;
  letter-spacing: 1px;
}

.audit-page .date-cell > strong,
.audit-page .sales-cell,
.audit-page .total-row {
  color: var(--overview-primary);
  font-size: var(--ui-row-primary-size);
  font-weight: 650;
}

.audit-page .scope-list {
  gap: 10px;
}

.audit-page .scope-list > span:not(.tiny-caret) {
  background: transparent;
  color: var(--overview-meta);
  font-size: var(--ui-row-meta-size);
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.audit-page .scope-list > span:not(.tiny-caret) + span:not(.tiny-caret)::before {
  content: "/";
  color: var(--overview-soft);
  margin-right: 10px;
}

.audit-page .event-line,
.audit-page .detail-time,
.audit-page .scope-badge {
  font-size: var(--overview-body);
}

.audit-page .event-line {
  color: var(--overview-secondary);
  font-weight: 800;
}

.audit-page .signon-event .event-line {
  color: var(--overview-meta);
  font-weight: 700;
}

.audit-page .event-line strong {
  color: var(--overview-primary);
  font-weight: 800;
}

.audit-page .audit-event .event-line strong {
  color: var(--overview-primary);
}

.audit-page .detail-time {
  color: var(--overview-meta);
  font-weight: 800;
}

.audit-page .scope-badge {
  gap: 6px;
  border-width: 0;
  box-shadow: inset 0 0 0 1px #cbd6e2;
  font-size: var(--ui-row-meta-size);
  font-weight: 700;
  line-height: var(--ui-overview-pill-line);
  padding-right: var(--ui-overview-pill-padding-x);
  padding-left: var(--ui-overview-pill-padding-x);
}

.audit-page .scope-badge::before {
  width: 6px;
  min-width: 6px;
  max-width: 6px;
  height: 6px;
  min-height: 6px;
  max-height: 6px;
  display: block;
  flex: 0 0 6px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
}

.audit-page .variance-pill {
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
  padding-right: 7px;
  padding-left: 7px;
}

.audit-page .status-check {
  width: 16px;
  height: 10px;
  border-left-width: 4px;
  border-bottom-width: 4px;
}

/* Overview experiment: compact table-style expanded events. */
.audit-page .day-details {
  display: block;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #f3f8fc;
  box-shadow: none;
  padding: 10px 20px 12px;
}

.audit-page .day-event {
  min-height: 46px;
  height: 46px;
  grid-template-columns: 72px 32px minmax(0, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
}

.audit-page .day-event::before {
  left: 95px;
}

.audit-page .day-event:first-child::before {
  top: -6px;
}

.audit-page .day-rail {
  height: 100%;
  align-self: stretch;
}

.audit-page .audit-scan-icon {
  width: 24px;
  height: 24px;
  image-rendering: auto;
}

.audit-page .day-event::after {
  display: none;
}

.audit-page .day-event:last-child::after {
  display: none;
}

.audit-page .event-line {
  position: relative;
  min-height: 46px;
  height: 46px;
  border: 1px solid var(--border-soft);
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding-left: 12px;
}

.audit-page .day-event:first-child .event-line {
  border-top: 1px solid var(--border-soft);
  border-radius: 7px 7px 0 0;
  box-shadow: var(--shadow);
}

.audit-page .event-line::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid rgba(203, 216, 229, 0.76);
}

.audit-page .day-event:last-child .event-line {
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0 0 7px 7px;
}

.audit-page .day-event:last-child .event-line::after {
  display: none;
}

.audit-page .audit-event .event-line {
  background: #fff;
}

.audit-page .audit-event .event-line:hover {
  background: #eaf4ff;
  box-shadow: none;
}

.audit-page .signon-event .event-line {
  border-color: var(--border-soft);
}

.audit-page .opened-event {
  min-height: 50px;
  height: 50px;
}

.audit-page .opened-event .event-line {
  min-height: 50px;
  height: 50px;
  background: #fff;
  box-shadow: none;
}

.audit-page .event-variance {
  min-height: 28px;
}

/* Reversible overview/timeline cohesion pass. Remove this block to revert. */
.audit-page {
  --overview-primary: var(--ui-primary);
  --overview-secondary: var(--ui-secondary);
  --overview-meta: var(--ui-meta);
  --overview-border: var(--ui-border);
  --overview-divider: var(--ui-divider);
  --overview-shadow-soft: var(--ui-shadow-soft);
}

.audit-page .audits-card,
.audit-page .audit-row,
.audit-page .event-line {
  border-color: var(--overview-border);
}

.audit-page .audits-card {
  box-shadow: var(--overview-shadow-soft);
}

.audit-page .audit-row {
  min-height: var(--ui-compact-row-height);
}

.audit-page .date-cell > strong,
.audit-page .sales-cell,
.audit-page .total-row,
.audit-page .event-line strong,
.audit-page .pill-button,
.audit-page .outline-button {
  color: var(--overview-primary);
}

.audit-page .date-cell > strong,
.audit-page .sales-cell {
  font-size: var(--ui-row-primary-size);
  font-weight: 600;
}

.audit-page .sales-cell {
  font-size: 14px;
}

.audit-page .scope-list > span:not(.tiny-caret) {
  font-size: var(--ui-row-meta-size);
  font-weight: 800;
}

.audit-page .event-line {
  color: var(--overview-secondary);
  font-weight: 800;
}

.audit-page .signon-event .event-line,
.audit-page .detail-time,
.audit-page .scope-list > span:not(.tiny-caret) {
  color: var(--overview-meta);
}

.audit-page .signon-event .event-line,
.audit-page .signon-event .event-main,
.audit-page .signon-event .event-main span,
.audit-page .detail-time {
  font-size: var(--ui-row-meta-size);
  font-weight: var(--ui-secondary-row-weight);
}

.audit-page .signon-event .event-dot {
  display: none;
}

.audit-page .day-details {
  gap: 0;
  padding-top: 6px;
  padding-bottom: 7px;
}

.audit-page .day-event {
  height: var(--ui-overview-signon-row-height);
  min-height: var(--ui-overview-signon-row-height);
}

.audit-page .event-line {
  height: var(--ui-overview-signon-row-height);
  min-height: var(--ui-overview-signon-row-height);
  border-color: var(--overview-divider);
  box-shadow: none;
}

.audit-page .audit-event,
.audit-page .audit-event .event-line {
  height: var(--ui-overview-audit-row-height);
  min-height: var(--ui-overview-audit-row-height);
}

.audit-page .opened-event,
.audit-page .opened-event .event-line {
  height: var(--ui-overview-audit-row-height);
  min-height: var(--ui-overview-audit-row-height);
}

.audit-page .event-line::after {
  border-bottom-color: var(--overview-divider);
}

.audit-page .event-variance {
  min-height: 24px;
}

.audit-page .variance-pill {
  box-shadow: none;
}

.audit-page .variance-pill.warn {
  border-width: 0;
  color: var(--overview-primary);
}

.audit-page .audit-row:hover,
.audit-page .audit-event .event-line:hover {
  border-color: var(--overview-border);
  background: var(--ui-hover-bg);
  box-shadow: none;
}

.audit-page .audit-day.is-expanded .audit-row:hover {
  box-shadow: inset 0 -1px 0 var(--overview-divider);
}

.overview-2-page .overview2-details {
  position: relative;
  display: grid;
  padding: 12px 20px 10px 32px;
  border-top: 1px solid #c9d8e8;
  background: #edf5fd;
}

.overview-2-page .overview2-details::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 20px;
  width: 2px;
  border-radius: 999px;
  background: #2f78d8;
}

.overview-2-page .overview2-details::after {
  content: none;
  position: absolute;
  top: 9px;
  left: 44px;
  color: #51657c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.overview-2-page .overview2-detail-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) var(--audit-sales-col) repeat(3, var(--audit-variance-col));
  min-height: 34px;
  align-items: center;
}

.overview-2-page .overview2-detail-card {
  display: contents;
}

.overview-2-page .overview2-event-main,
.overview-2-page .overview2-sales-spacer,
.overview-2-page .overview2-detail-row .event-variance {
  min-height: 34px;
  align-self: stretch;
  border-top: 1px solid #d4e1ee;
  background: #f4f9fe;
}

.overview-2-page .overview2-event-main {
  grid-column: 1;
  border-left: 1px solid #d4e1ee;
  padding-left: 12px;
}

.overview-2-page .overview2-sales-spacer {
  grid-column: 2;
}

.overview-2-page .overview2-detail-row .event-variance.display {
  grid-column: 3;
}

.overview-2-page .overview2-detail-row .event-variance.backstock {
  grid-column: 4;
}

.overview-2-page .overview2-detail-row .event-variance.vending {
  grid-column: 5;
  border-right: 1px solid #d4e1ee;
}

.overview-2-page .overview2-detail-row:first-child .overview2-event-main {
  border-top: 1px solid #d4e1ee;
  border-top-left-radius: 7px;
}

.overview-2-page .overview2-detail-row:first-child .event-variance.vending {
  border-top-right-radius: 7px;
}

.overview-2-page .overview2-detail-row:last-child .overview2-event-main,
.overview-2-page .overview2-detail-row:last-child .overview2-sales-spacer,
.overview-2-page .overview2-detail-row:last-child .event-variance {
  border-bottom: 1px solid #d4e1ee;
}

.overview-2-page .overview2-detail-row:last-child .overview2-event-main {
  border-bottom-left-radius: 7px;
}

.overview-2-page .overview2-detail-row:last-child .event-variance.vending {
  border-bottom-right-radius: 7px;
}

.overview-2-page .overview2-detail-time {
  display: inline-flex;
  color: #51657c;
  font-size: var(--ui-row-meta-size);
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.overview-2-page .overview2-time-separator {
  color: #8da1b5;
  font-weight: 800;
}

.overview-2-page .opened-detail {
  min-height: 44px;
}

.overview-2-page .opened-detail .overview2-event-main,
.overview-2-page .opened-detail .overview2-sales-spacer,
.overview-2-page .opened-detail .event-variance {
  min-height: 44px;
}

.overview-2-page .overview2-event-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--overview-meta);
  font-size: var(--ui-row-meta-size);
  font-weight: var(--ui-secondary-row-weight);
}

.overview-2-page .overview2-event-main span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.overview-2-page .overview2-event-main strong {
  color: var(--overview-primary);
  font-size: var(--ui-row-meta-size);
  font-weight: 800;
}

.overview-2-page .audit-detail .overview2-event-main strong {
  color: #2f78d8;
  font-size: 14px;
  font-weight: 900;
}

.overview-2-page .audit-detail .scope-badge {
  gap: 5px;
  font-size: 12px;
  line-height: 16px;
  padding-right: 6px;
  padding-left: 6px;
}

.overview-2-page .audit-detail .scope-badge::before {
  width: 5px;
  min-width: 5px;
  max-width: 5px;
  height: 5px;
  min-height: 5px;
  max-height: 5px;
  flex-basis: 5px;
}

.overview-2-page .signon-detail .overview2-event-main strong {
  color: var(--overview-meta);
  font-weight: var(--ui-secondary-row-weight);
}

.overview-2-page .audit-detail {
  cursor: pointer;
}

.overview-2-page .audit-detail:hover .overview2-event-main,
.overview-2-page .audit-detail:hover .overview2-sales-spacer,
.overview-2-page .audit-detail:hover .event-variance {
  background: #eef5fc;
}

.audit-page .audit-day-static .audit-row {
  cursor: default;
}

.audit-page .audit-day-static .audit-row:hover {
  background: #fff;
  border-color: var(--overview-border);
  box-shadow: none;
}
