:root {
  --bg: #f7f1eb;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-strong: #fffaf6;
  --text: #1f1a17;
  --muted: #75675d;
  --line: rgba(31, 26, 23, 0.08);
  --accent: #df9f9b;
  --accent-soft: #f6d8d2;
  --accent-strong: #a86a66;
  --ink-soft: #fff1ec;
  --shadow: 0 24px 60px rgba(72, 44, 33, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 28%),
    linear-gradient(180deg, #fbf7f3 0%, #f3e8e0 100%);
}

.access-denied {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-denied-card {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.access-denied-card h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.access-denied-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 28%),
    linear-gradient(180deg, #fbf7f3 0%, #f3e8e0 100%);
}

.access-gate[hidden] {
  display: none !important;
}

.access-gate-card {
  width: min(400px, 100%);
  padding: 32px 28px 30px;
  border-radius: 32px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.access-gate-title {
  margin: 14px 0 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.access-gate-meta {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.access-gate-meta strong {
  color: var(--text);
  font-weight: 700;
}

.access-gate-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.access-gate-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.access-gate-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  font: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.access-gate-input:focus {
  border-color: rgba(168, 106, 102, 0.45);
  box-shadow: 0 0 0 3px rgba(223, 159, 155, 0.35);
}

.access-gate-error {
  margin: 0;
  min-height: 1.35em;
  font-size: 13px;
  font-weight: 600;
  color: #9b2c2c;
}

.access-gate-submit {
  margin-top: 4px;
  padding: 14px 20px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.access-gate-submit:hover {
  filter: brightness(1.05);
}

.access-gate-submit:active {
  transform: scale(0.98);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 10%, rgba(240, 198, 192, 0.32), transparent 14%),
    radial-gradient(circle at 12% 85%, rgba(255, 255, 255, 0.4), transparent 20%);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.promo-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5d4cf, #fbebe7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.promo-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.promo-copy strong,
.promo-pill {
  font-size: 14px;
  font-weight: 800;
}

.promo-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: stretch;
  padding: 42px;
  border-radius: 40px;
  background:
    radial-gradient(circle at right top, rgba(246, 216, 210, 0.8), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(254, 248, 244, 0.95));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.hero-copy {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1,
.panel h2,
.empty-state h2 {
  margin: 12px 0 0;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(40px, 5vw, 70px);
  max-width: 900px;
  color: #161210;
}

.hero h1 span {
  color: #161210;
  background: linear-gradient(180deg, transparent 55%, rgba(246, 216, 210, 0.95) 55%);
}

.hero-text {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
}

.hero-badge {
  min-width: 290px;
  padding: 26px 28px;
  border-radius: 32px;
  background: #1f1a17;
  color: #fffaf6;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge span {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.hero-badge strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.25;
}

.dashboard {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.crmlove-credit {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.crmlove-credit a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.crmlove-credit a:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: 28px;
  padding: 22px 8px 36px;
  border-top: 1px solid var(--line);
}

.access-gate-credit {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tabs {
  display: inline-flex;
  gap: 10px;
  margin-top: 18px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.tab-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.tab-button:hover {
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.tab-button.is-active {
  background: #1f1a17;
  color: #fff7f3;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.period-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.date-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.date-field input {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  outline: none;
}

.ghost-button {
  border: 0;
  background: #1f1a17;
  color: #fffaf6;
  padding: 12px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.toolbar-note {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.metrics-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

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

.content-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.content-grid.single-panel {
  grid-template-columns: 1fr;
}

.metric-card,
.panel,
.empty-state {
  background: var(--paper);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 24px 24px 26px;
  border-radius: 30px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-card strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.metric-card.accent {
  background: linear-gradient(180deg, #f6d8d2, #efc5be);
  color: #1f1a17;
}

.metric-card.accent span {
  color: rgba(31, 26, 23, 0.56);
}

.panel {
  border-radius: 34px;
  padding: 30px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.stock-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #1f1a17;
}

.segmented-control {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #fbf2ed;
  border: 1px solid var(--line);
}

.segmented-control-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.segmented-control-button:hover {
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.segmented-control-button.is-active {
  background: #1f1a17;
  color: #fffaf6;
}

.panel h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.table-meta {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.daily-chart {
  display: grid;
  gap: 14px;
}

.chart-shell {
  display: grid;
  gap: 18px;
}

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

.chart-summary-item {
  padding: 18px 20px;
  border-radius: 24px;
  background: #fff8f5;
  border: 1px solid var(--line);
}

.chart-summary-item span,
.chart-foot,
.chart-scale {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-summary-item strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.chart-summary-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.chart-stage {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0 36px;
}

.sales-chart {
  width: 100%;
  height: 240px;
  display: block;
  overflow: visible;
}

.sales-chart-axis {
  stroke: rgba(31, 26, 23, 0.14);
  stroke-width: 1.5;
}

.sales-chart-area {
  fill: url(#sales-area);
}

.sales-chart-line {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-chart-dot {
  fill: #fffaf6;
  stroke: var(--accent-strong);
  stroke-width: 2.5;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.chart-timeline-item {
  position: relative;
  flex: 1 1 0;
  text-align: center;
}

.chart-timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -10px;
  width: 1px;
  height: 8px;
  background: rgba(31, 26, 23, 0.28);
}

.chart-timeline-item:first-child {
  text-align: left;
}

.chart-timeline-item:last-child {
  text-align: right;
}

.period-summary-item {
  padding: 22px 22px 20px;
  border-radius: 26px;
  background: #fff8f5;
  border: 1px solid var(--line);
}

.period-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.period-summary-item strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.period-summary-item small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.top-products {
  display: grid;
  gap: 12px;
}

.top-product {
  padding: 18px 20px;
  border-radius: 26px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.top-product-head,
.top-product-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.top-product-name {
  font-weight: 700;
  line-height: 1.45;
}

.top-product-rank,
.top-product-qty {
  flex-shrink: 0;
  font-weight: 800;
  color: #1f1a17;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ink-soft);
}

.ranking-card .top-product-head {
  align-items: center;
}

.top-product-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.pagination-button {
  border: 1px solid rgba(31, 26, 23, 0.08);
  background: #fff8f5;
  color: #1f1a17;
  padding: 12px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1f1a17;
  color: #fffaf6;
}

.pagination-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.pagination-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

thead {
  background: #fbf2ed;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rank-cell {
  width: 110px;
  white-space: nowrap;
  font-weight: 800;
  color: var(--accent-strong);
}

tbody tr:hover {
  background: #fff8f5;
}

.product-name {
  font-weight: 700;
  line-height: 1.45;
}

.product-link {
  color: inherit;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 106, 102, 0.28);
}

.product-link:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.product-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.product-note--hollyshop {
  margin-top: 8px;
  color: #1b4332;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.product-note--stock-level {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  opacity: 0.92;
  font-weight: 500;
}

.empty-state {
  padding: 44px 28px;
  text-align: center;
  border-radius: 34px;
}

.empty-inline {
  padding: 18px 20px;
  border-radius: 20px;
  background: #fff8f5;
  border: 1px dashed rgba(168, 106, 102, 0.28);
  color: var(--muted);
  line-height: 1.6;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
  padding: 28px 18px;
}

.empty-state p {
  margin: 14px auto 0;
  max-width: 420px;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .promo-strip {
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .report-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head,
  .panel-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-badge {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding: 20px 0 28px;
  }

  .hero,
  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .promo-strip {
    padding: 16px;
    border-radius: 24px;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  .report-toolbar {
    padding: 16px;
    border-radius: 24px;
  }

  .period-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .date-field {
    justify-content: space-between;
  }

  .ghost-button {
    width: 100%;
  }

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

  .chart-summary {
    grid-template-columns: 1fr;
  }

  .chart-stage {
    grid-template-columns: 1fr;
  }

  .chart-scale {
    display: none;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-status {
    order: -1;
  }

}
