:root {
  --bg-app: #0b1220;
  --bg-panel: #0f172a;
  --text-primary: #e5e7eb;
  --text-sidebar: #e2e8f0;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-input: rgba(255, 255, 255, 0.14);
  --card-bg: rgba(255, 255, 255, 0.06);
  --radius-card: 16px;
  --radius-card-sm: 14px;
  --accent: rgba(99, 102, 241, 0.5);
  --accent-strong: rgba(99, 102, 241, 0.65);
  --nav-link-bg: rgba(255, 255, 255, 0.04);
  --focus: #38bdf8;
  --input-fill: rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.35);
  --sidebar-width: 220px;
  --tap-min: 44px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.25);
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  z-index: 100;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

h1 {
  font-size: clamp(1.25rem, 2.8vw, 1.45rem);
}

h2 {
  font-size: 1.1rem;
}

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

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.page-head p {
  margin: 0;
  max-width: 62ch;
}

.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 20px;
  margin-bottom: 20px;
}

.page-intro__lead {
  margin: 6px 0 0;
  max-width: 52ch;
  line-height: 1.5;
}

.page-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-intro__actions .btn {
  min-height: 42px;
}

.card--soft {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.1);
}

.filter-card {
  padding: 16px;
}

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

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

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 24px;
  margin-bottom: 22px;
}

.dash-header__title {
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 10px 0 8px;
}

.dash-header__lead {
  margin: 0;
  max-width: 48ch;
  line-height: 1.55;
  font-size: 15px;
}

.dash-header__lead strong {
  color: #e5e7eb;
  font-weight: 700;
}

.dash-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
}

.dash-period__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
}

.dash-period__range {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dash-actions .btn {
  min-height: 44px;
  padding-left: 18px;
  padding-right: 18px;
}

.btn-ghost {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--text-sidebar);
}

.btn-ghost:hover {
  background: var(--nav-link-bg);
  border-style: solid;
  border-color: var(--border-subtle);
}

.dash-summary {
  padding: 20px 20px 18px;
}

.dash-summary__title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-summary__sub {
  margin: 0 0 18px;
  font-size: 14px;
}

.stat-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-panels--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

@media (max-width: 520px) {
  .stat-panels--quad {
    grid-template-columns: 1fr;
  }
}

.stat-panels--tray {
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
  .stat-panels:not(.stat-panels--quad) {
    grid-template-columns: 1fr;
  }
}

.stat-panel {
  position: relative;
  padding: 18px 16px 16px;
  min-height: 124px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(11, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 3px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 10px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-panel:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 14px 36px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .stat-panel {
    transition: none;
  }

  .stat-panel:hover {
    transform: none;
  }
}

.stat-panel--sales {
  border-top-color: rgba(129, 140, 252, 0.95);
}

.stat-panel--orders {
  border-top-color: rgba(45, 212, 191, 0.9);
}

.stat-panel--ticket {
  border-top-color: rgba(56, 189, 248, 0.9);
}

.stat-panel--intro {
  border-top-color: rgba(148, 163, 184, 0.55);
  justify-content: center;
}

.stat-panel__intro-heading {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-panel__intro-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.stat-panel--items {
  border-top-color: rgba(167, 139, 250, 0.95);
}

.stat-panel--line {
  border-top-color: rgba(99, 102, 241, 0.85);
}

.stat-panel--closed {
  border-top-color: rgba(244, 114, 182, 0.9);
}

.stat-panel--cash {
  border-top-color: rgba(52, 211, 153, 0.9);
}

.stat-panel--noncash {
  border-top-color: rgba(56, 189, 248, 0.85);
}

.stat-panel--peak {
  border-top-color: rgba(251, 191, 36, 0.95);
}

.report-stat-section .stat-panels {
  margin: 0;
}

.report-chart-below-tiles {
  margin-top: 14px;
}

.stat-panel__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-panel__value {
  font-size: clamp(1.45rem, 4.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-panel__unit {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 5px;
}

.stat-panel__hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.stat-panel:has(.stat-panel__hint) {
  justify-content: flex-start;
}

.dash-compare {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 14px;
}

.dash-compare__label {
  font-weight: 600;
}

.dash-compare__prior {
  font-size: 13px;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dash-pill--up {
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: #5eead4;
}

.dash-pill--down {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.dash-chart {
  padding: 18px 18px 16px;
}

.chart-card-head {
  margin-bottom: 12px;
}

.chart-card-head__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.chart-card-head__sub {
  margin: 0;
  font-size: 13px;
}

.chart-surface {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 8px 4px;
}

.dash-empty {
  text-align: center;
  padding: 28px 20px 24px;
}

.dash-empty--compact {
  padding: 16px 12px;
  text-align: left;
}

.dash-empty__title {
  font-weight: 800;
  margin: 0 0 8px;
  font-size: 1rem;
}

.dash-empty__text {
  margin: 0 auto 16px;
  max-width: 36ch;
  line-height: 1.5;
  font-size: 14px;
}

.dash-recent {
  padding: 18px 18px 16px;
}

.orders-index-card {
  padding: 18px 18px 16px;
}

.orders-empty {
  padding: 12px 8px 20px;
  text-align: center;
}

.orders-empty .dash-empty__text {
  margin-bottom: 14px;
}

.order-detail-back {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.order-detail-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3.2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.order-detail-total-line {
  margin: 0 0 8px;
}

.order-detail-total-line__value {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.order-detail-total-line__cur {
  font-size: 1rem;
  font-weight: 650;
  margin-left: 6px;
}

.order-detail-lead .order-detail-pay-hint {
  text-transform: capitalize;
}

.order-detail-actions {
  align-items: flex-start;
}

.order-detail-grid {
  margin-bottom: 4px;
}

.order-detail-lines {
  padding: 14px 14px 12px;
  margin-top: 16px;
}

.order-detail-lines__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.order-detail-lines__head .chart-title {
  margin: 0;
}

.order-detail-lines__count {
  font-size: 12px;
  font-weight: 700;
}

.order-lines-scroll {
  max-height: min(65vh, 480px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.order-lines-head,
.order-lines-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem 3.75rem 4.25rem;
  gap: 6px 10px;
  align-items: center;
  padding: 0 10px;
}

.order-lines-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-lines-head__num,
.order-lines-list__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-lines-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-lines-list__row {
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 12px;
  line-height: 1.25;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-lines-list__row:last-child {
  border-bottom: none;
}

.order-lines-list__row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.order-lines-list__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-lines-list__num {
  font-size: 11px;
  color: #cbd5e1;
}

.order-lines-list__total {
  font-weight: 700;
  color: #e2e8f0;
  font-size: 12px;
}

@media (max-width: 520px) {
  .order-lines-head,
  .order-lines-list__row {
    grid-template-columns: minmax(0, 1fr) 2.5rem 3rem 3.5rem;
    gap: 4px 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .order-lines-list__row {
    font-size: 11px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .order-lines-list__num {
    font-size: 10px;
  }

  .order-lines-list__total {
    font-size: 11px;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }
}

.order-pay-card--sep {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-pay-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-pay-card__amt {
  font-size: 1.15rem;
}

.order-pay-meta {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.order-pay-details {
  margin-top: 12px;
}

.order-pay-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-pay-details__pre {
  margin-top: 10px;
  max-height: 220px;
}

.order-detail-chart {
  margin-top: 16px;
  padding: 18px 18px 14px;
}

.dash-recent__hint {
  margin: -4px 0 14px;
  font-size: 13px;
  line-height: 1.45;
}

/* Mobile-first dashboard (MY BAR–style layout, portal palette) */
.dash-page .main.page-shell {
  max-width: 520px;
  padding-top: 12px;
}

.dash-mobile {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
  margin: 0 -2px;
}

.dash-filters::-webkit-scrollbar {
  display: none;
}

.dash-filter {
  flex: 0 0 auto;
  min-height: var(--tap-min);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}

.dash-filter:hover {
  text-decoration: none;
  background: rgba(99, 102, 241, 0.6);
}

.dash-filter.is-active {
  background: rgba(99, 102, 241, 0.85);
  border-color: rgba(165, 180, 252, 0.7);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.dash-filter--muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-sidebar);
}

.dash-range {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.dash-range__label {
  font-weight: 800;
  color: var(--text-primary);
}

.dash-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card-sm);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}

.dash-panel--accent {
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.35) 0%, rgba(167, 139, 250, 0.28) 100%);
  border-color: rgba(167, 139, 250, 0.35);
}

.dash-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-panel__head--soft {
  background: rgba(255, 255, 255, 0.03);
}

.dash-panel__head--invert {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.dash-panel__head--bar {
  background: rgba(15, 23, 42, 0.65);
  border-bottom: none;
}

.dash-panel__head--bar .dash-panel__title {
  color: #f1f5f9;
}

.dash-panel__icon {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.85;
}

.dash-panel__list-icon {
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0 28%,
    transparent 28% 38%,
    rgba(255, 255, 255, 0.9) 38% 62%,
    transparent 62% 72%,
    rgba(255, 255, 255, 0.9) 72% 100%
  );
  opacity: 0.85;
}

.dash-panel__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-panel__head--invert .dash-panel__title,
.dash-panel--accent .dash-panel__title {
  color: #e2e8f0;
}

.dash-panel__empty {
  margin: 0;
  padding: 16px 14px;
  font-size: 14px;
}

.dash-panel__chart {
  padding: 8px 10px 12px;
}

.dash-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-rank-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-rank-list__item:last-child {
  border-bottom: none;
}

.dash-rank-list__name {
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-rank-list__badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(167, 139, 250, 0.75);
  border: 1px solid rgba(196, 181, 253, 0.4);
}

.dash-chart-hero {
  padding: 0;
  border: none;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.dash-chart-hero__surface {
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.75) 0%, rgba(79, 70, 229, 0.9) 100%);
  padding: 14px 12px 10px;
}

.chart-wrap--hero {
  min-height: 220px;
  height: 240px;
}

.dash-hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-hero {
  border-radius: 14px;
  padding: 18px 16px 16px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dash-hero--sales {
  background: linear-gradient(145deg, rgba(129, 140, 248, 0.55) 0%, rgba(79, 70, 229, 0.82) 100%);
}

.dash-hero--avg {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.45) 0%, rgba(217, 119, 6, 0.7) 100%);
}

.dash-hero__value {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}

.dash-hero__unit {
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0.92;
}

.dash-hero__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.dash-compare {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.5;
}

.dash-compare__wow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.donut-card__chart {
  position: relative;
  padding: 8px 12px 16px;
}

.chart-wrap--donut {
  min-height: 220px;
  height: 240px;
}

.chart-wrap--compact {
  min-height: 140px;
  height: 160px;
}

.donut-card__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  max-width: 42%;
  line-height: 1.25;
}

.donut-card__name {
  display: block;
  font-size: clamp(0.75rem, 3.2vw, 0.95rem);
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-card__pct {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.1rem, 4.5vw, 1.45rem);
  font-weight: 800;
  color: #94a3b8;
}

.item-sales-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-sales-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: var(--tap-min);
}

.item-sales-list__row:last-child {
  border-bottom: none;
}

.item-sales-list__name {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sales-list__calc {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(56, 189, 248, 0.55);
  border: 1px solid rgba(125, 211, 252, 0.35);
  white-space: nowrap;
}

.dash-donut-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
}

.dash-footer-links .btn {
  flex: 1;
  min-width: 120px;
  min-height: var(--tap-min);
}

@media (min-width: 640px) {
  .dash-page .main.page-shell {
    max-width: 720px;
  }

  .dash-donut-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .dash-hero-metrics {
    gap: 16px;
  }
}

.reports-page .main.page-shell {
  max-width: 520px;
}

.reports-page .reports-intro {
  margin-bottom: 14px;
}

.reports-page .filter-card {
  padding: 14px;
}

.reports-page .filter-bar {
  flex-direction: column;
  align-items: stretch;
}

.reports-page .filter-bar .form-row {
  width: 100%;
}

.reports-page .filter-bar .form-actions .btn {
  width: 100%;
  min-height: var(--tap-min);
}

.reports-page .report-stat-section .stat-panels--quad {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reports-page .stat-panel {
  min-height: 100px;
  padding: 14px 12px;
}

.reports-page .chart-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.reports-ops-grid {
  margin-top: 12px;
}

.reports-item-list {
  margin-top: 14px;
}

.reports-tz-hint {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12px;
}

@media (min-width: 640px) {
  .reports-page .main.page-shell {
    max-width: 900px;
  }

  .reports-page .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .reports-page .filter-bar .form-actions .btn {
    width: auto;
  }
}

@media (min-width: 900px) {
  .dash-page .main.page-shell {
    max-width: 960px;
  }

  .reports-page .main.page-shell {
    max-width: 1080px;
  }

  .dash-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  .dash-filters,
  .dash-range,
  .dash-chart-hero,
  .dash-hero-metrics,
  .dash-compare,
  .dash-footer-links {
    grid-column: 1 / -1;
  }

  .dash-panel:first-of-type {
    grid-column: 1 / -1;
  }
}

.activity-list__item {
  padding: 0;
  border-bottom: none;
}

.activity-list__item + .activity-list__item {
  margin-top: 4px;
}

.activity-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  margin: 0;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-list__row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.activity-list__row:hover .activity-list__title {
  color: #c7d2fe;
}

.activity-list__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-chip {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.activity-list__chev {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  margin-right: 4px;
  opacity: 0.7;
}

.activity-list__row:hover .activity-list__chev {
  border-color: #a5b4fc;
  opacity: 1;
}

.activity-list__title {
  font-weight: 700;
  font-size: 15px;
}

.activity-list__meta {
  font-size: 13px;
}

.activity-list__amt {
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.section-head-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.h2-plain {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.link-quiet {
  font-size: 14px;
  font-weight: 600;
  color: #a5b4fc;
}

.link-quiet:hover {
  color: #c7d2fe;
}

.section-block--tight {
  margin-top: 22px;
}

.kpi-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.kpi-card__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-panel);
  color: var(--text-sidebar);
  padding: 18px 16px;
  padding-top: max(18px, env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border-subtle);
}

.brand {
  margin-bottom: 8px;
}

.brand__logo {
  display: block;
  max-width: 100%;
}

.app-logo-link,
.app-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 100%;
}

.app-logo-link:hover {
  text-decoration: none;
  opacity: 0.92;
}

.app-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.app-logo--sidebar {
  width: 100%;
}

.app-logo--topbar {
  max-height: 64px;
}

.app-logo--login {
  max-height: 200px;
  max-width: min(400px, 96vw);
  object-position: center center;
}

.login-logo {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.app-logo--shared {
  width: 100%;
}

.shared-report__head {
  margin-bottom: 24px;
}

.shared-report__logo {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.shared-report__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shared-report__title {
  margin: 0 0 8px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover {
  background: var(--nav-link-bg);
  text-decoration: none;
}

.nav a.active {
  background: var(--nav-link-bg);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.22);
}

.sidebar-footer {
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar-tenant {
  font-weight: 700;
  color: var(--text-sidebar);
  line-height: 1.35;
}

.sidebar-logout {
  margin-top: 10px;
}

.portal-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main {
  flex: 1;
  padding: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  min-width: 0;
}

.main.page-shell {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

#main-content:focus {
  outline: none;
}

.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title {
  font-weight: 800;
  font-size: 14px;
  text-align: right;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.topbar-brand__venue {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}

.topbar-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #a5b4fc;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
}

.topbar-link:hover {
  text-decoration: none;
  background: var(--nav-link-bg);
  color: #c7d2fe;
}

.menu-toggle {
  border: 1px solid var(--border-subtle);
  background: var(--nav-link-bg);
  color: var(--text-primary);
  border-radius: 10px;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle__bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.drawer-backdrop {
  display: none;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card-sm);
  padding: 16px;
  box-shadow: var(--shadow-elevated);
}

.card + .card {
  margin-top: 16px;
}

.card--chart {
  display: flex;
  flex-direction: column;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}

table.data.table-mobile-friendly {
  min-width: 0;
}

table.data th,
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

table.data th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

table.data tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

table.data a {
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 16px;
  min-height: var(--tap-min);
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: var(--accent);
  color: #f8fafc;
  cursor: pointer;
  font-size: 15px;
}

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

.btn-secondary {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--nav-link-bg);
}

.btn-block {
  width: 100%;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
textarea,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-input);
  background: var(--input-fill);
  color: var(--text-primary);
  padding: 12px 14px;
  font-size: 16px;
  min-height: var(--tap-min);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

.pill.ok {
  border-color: rgba(20, 184, 166, 0.45);
  color: #5eead4;
}

.pill.bad {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.messages {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 32px));
}

.message {
  background: rgba(11, 18, 32, 0.92);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: var(--shadow-elevated);
}

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #0b1220;
  background-image: radial-gradient(
      800px 600px at 20% 10%,
      rgba(99, 102, 241, 0.22),
      transparent 55%
    ),
    radial-gradient(900px 700px at 80% 90%, rgba(20, 184, 166, 0.12), transparent 55%);
  display: grid;
  place-items: center;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(420px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-elevated);
}

.onboarding-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  border-radius: var(--radius-card-sm);
  padding: 18px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

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

.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.section-block {
  margin-top: 28px;
}

.section-block:first-of-type {
  margin-top: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.kpi-card .stat-value {
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
}

.kpi-currency {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 4px;
}

.wow-up {
  color: #5eead4;
  font-weight: 800;
}

.wow-down {
  color: #fca5a5;
  font-weight: 800;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 240px;
  height: 260px;
  width: 100%;
}

.chart-wrap.chart-wrap--tall {
  min-height: 280px;
  height: 300px;
}

.chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.chart-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.stat-hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 12px;
}

pre.metadata {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: var(--text-sidebar);
  overflow: auto;
  max-height: min(52vh, 360px);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.table-compact td,
.table-compact th {
  font-size: 13px;
}

.empty-hint {
  margin: 0;
  padding: 12px 0 4px;
  font-size: 14px;
}

.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #cbd5e1;
  word-break: break-all;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.payment-card {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.payment-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.payment-card__amt {
  font-size: 1.1rem;
}

.callout {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.callout--warn {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.35);
}

.order-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.order-list-primary {
  font-weight: 750;
  font-size: 15px;
}

.order-list-sub {
  font-size: 12px;
  line-height: 1.35;
}

.dl-grid {
  display: grid;
  gap: 10px 16px;
}

.dl-grid dt {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dl-grid dd {
  margin: 0;
  font-weight: 650;
}

@media (min-width: 560px) {
  .dl-grid {
    grid-template-columns: 160px 1fr;
    align-items: baseline;
  }
}

@media (min-width: 861px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 860px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-width), 88vw);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 30;
    height: 100vh;
    height: 100dvh;
    overflow: auto;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 25;
  }

  body.nav-open .drawer-backdrop {
    display: block;
  }

  .topbar {
    display: flex;
  }

  .main {
    padding: 16px;
  }

  table.data.stack-on-mobile {
    min-width: 0;
  }

  table.data.stack-on-mobile thead {
    display: none;
  }

  table.data.stack-on-mobile td.hide-sm,
  table.data.stack-on-mobile th.hide-sm {
    display: none;
  }

  table.data.stack-on-mobile tbody tr {
    display: block;
    padding: 12px 0;
  }

  table.data.stack-on-mobile tbody td {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 8px 12px;
    padding: 8px 14px;
    border: none;
    text-align: left;
    align-items: start;
  }

  table.data.stack-on-mobile tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
  }

  table.data.stack-on-mobile tbody td.cell-span {
    grid-column: 1 / -1;
  }
}
