:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --text: #16152a;
  --muted: #626579;
  --accent: #ff1822;
  --accent-strong: #d7111b;
  --brand-navy: #1b1b37;
  --brand-blue: #273463;
  --brand-ice: #eef2ff;
  --line: rgba(22, 21, 42, 0.1);
  --shadow: 0 24px 50px rgba(16, 22, 56, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 24, 34, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(39, 52, 99, 0.16), transparent 30%),
    linear-gradient(180deg, #f7f9fd 0%, #eef2fb 100%);
  min-height: 100vh;
}

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

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

.site-header,
.page-heading,
.hero {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-header {
  margin-bottom: 32px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 244, 255, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand-cluster {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--accent);
}

.brand-title span {
  color: var(--brand-navy);
}

.brand-subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-mark {
  position: relative;
  width: 58px;
  height: 72px;
  flex: 0 0 auto;
}

.brand-mark-red,
.brand-mark-navy {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 18%, 58% 33%, 34% 100%, 17% 83%);
}

.brand-mark-red {
  background: var(--accent);
}

.brand-mark-navy {
  inset: 13% 0 0 18%;
  background: var(--brand-navy);
  clip-path: polygon(18% 33%, 100% 0, 42% 100%);
}

.site-nav {
  display: flex;
  gap: 16px;
  padding-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 11px 15px;
  border: 1px solid rgba(39, 52, 99, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  color: var(--brand-navy);
}

.nav-user {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 4px;
  font-weight: 700;
  color: var(--brand-navy);
}

.nav-user small {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-logout-form {
  margin: 0;
}

.site-nav a:hover {
  border-color: rgba(255, 24, 34, 0.22);
  color: var(--accent-strong);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.73rem;
  color: var(--muted);
}

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

h2 {
  font-size: clamp(2rem, 2.9vw, 3.1rem);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.hero {
  margin-bottom: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.metric-card,
.table-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-copy,
.hero-panel {
  border-radius: 30px;
  padding: 32px;
}

.hero-copy {
  flex: 1.3;
  background:
    linear-gradient(140deg, rgba(27, 27, 55, 0.98), rgba(39, 52, 99, 0.94)),
    var(--brand-navy);
  color: #f8faff;
}

.hero-copy .eyebrow,
.hero-copy p {
  color: rgba(248, 250, 255, 0.78);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(255, 24, 34, 0.22);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-panel {
  flex: 0.9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 242, 255, 0.82));
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.dashboard-view-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.week-stamp {
  margin-bottom: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.8fr);
  gap: 20px;
  margin-bottom: 28px;
}

.public-hero-copy,
.public-hero-panel,
.public-card,
.stat-panel,
.timeline-card,
.contact-panel,
.role-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.public-hero-copy,
.public-hero-panel {
  border-radius: 32px;
  padding: 34px;
}

.public-hero-copy {
  background:
    radial-gradient(circle at top left, rgba(255, 24, 34, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(27, 27, 55, 0.99), rgba(39, 52, 99, 0.95));
  color: #f8faff;
}

.public-hero-copy .eyebrow,
.public-hero-copy p {
  color: rgba(248, 250, 255, 0.78);
}

.public-hero-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.public-hero-text {
  max-width: 42rem;
  font-size: 1.08rem;
  line-height: 1.65;
}

.public-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.proof-chip {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.proof-chip strong,
.hero-stat strong,
.contact-line {
  display: block;
  font-size: 1rem;
  color: inherit;
}

.proof-chip span,
.hero-stat span {
  display: block;
  margin-top: 6px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.public-hero-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 242, 255, 0.86));
}

.hero-stat-stack {
  display: grid;
  gap: 14px;
}

.hero-stat {
  padding: 18px 18px 16px;
  border: 1px solid rgba(22, 21, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

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

.stat-panel {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 255, 0.84));
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.public-grid {
  display: grid;
  gap: 18px;
}

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

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

.public-card,
.role-card,
.timeline-card,
.contact-panel {
  border-radius: 26px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 255, 0.84));
}

.public-card-strong,
.public-section-contrast .role-card {
  background:
    linear-gradient(160deg, rgba(27, 27, 55, 0.98), rgba(39, 52, 99, 0.93));
  color: #f8faff;
}

.public-card-strong p,
.public-section-contrast .role-card li,
.public-section-contrast .role-card h3 {
  color: #f8faff;
}

.public-section-contrast {
  padding: 6px 0;
}

.role-columns,
.timeline-grid {
  display: grid;
  gap: 18px;
}

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

.timeline-step {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 24, 34, 0.1);
  color: var(--accent-strong);
  font-weight: 800;
}

.public-contact {
  margin-bottom: 8px;
}

.contact-panel {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.metric-card {
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 255, 0.82));
}

.metric-label,
.subtle,
label {
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 12px;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand-navy);
}

.metric-note,
.page-copy {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash-banner {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-navy);
  box-shadow: var(--shadow);
}

.flash-error {
  border-color: rgba(255, 24, 34, 0.2);
  background: rgba(255, 24, 34, 0.07);
}

.flash-warning {
  border-color: rgba(255, 122, 24, 0.18);
  background: rgba(255, 122, 24, 0.08);
}

.flash-info {
  border-color: rgba(39, 52, 99, 0.14);
  background: rgba(39, 52, 99, 0.06);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 255, 0.84));
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-shell {
  display: flex;
  justify-content: center;
  padding: 44px 0 16px;
}

.login-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 255, 0.84));
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.dashboard-card-wide {
  grid-column: span 2;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.card-heading h3 {
  margin-bottom: 0;
}

.mini-table,
.bar-list,
.mix-list {
  display: grid;
  gap: 14px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(22, 21, 42, 0.08);
}

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

.mini-rank {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 24, 34, 0.08);
  color: var(--accent-strong);
  font-weight: 800;
}

.mini-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-row,
.mix-row {
  display: grid;
  gap: 8px;
}

.mix-compare {
  display: grid;
  gap: 6px;
}

.mix-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mix-summary-stat {
  padding: 16px 18px;
  border: 1px solid rgba(22, 21, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.mix-summary-value {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand-navy);
}

.bar-meta,
.mix-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bar-track,
.mix-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(39, 52, 99, 0.08);
  overflow: hidden;
}

.bar-track span,
.mix-track span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-navy));
}

.bar-track.accent span {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 220px;
}

.trend-point {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  min-height: 220px;
}

.trend-bar {
  height: 150px;
  display: flex;
  align-items: end;
  border-radius: 18px;
  background: rgba(39, 52, 99, 0.08);
  padding: 8px;
}

.trend-bar span {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), var(--brand-navy));
}

.trend-bar-sales span {
  background: linear-gradient(180deg, #ff6b72, #d7111b);
}

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

.line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 21, 42, 0.08);
  color: var(--brand-navy);
  font-weight: 600;
}

.legend-swatch {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
}

.legend-company {
  background: #d7111b;
}

.legend-rep {
  background: #273463;
}

.line-chart {
  width: 100%;
  height: 240px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 107, 114, 0.08), rgba(255, 107, 114, 0.01)),
    rgba(39, 52, 99, 0.04);
}

.line-chart-stroke {
  stroke: #d7111b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart-stroke-secondary {
  stroke: #273463;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 6;
}

.line-chart-dot {
  fill: #ffffff;
  stroke: #d7111b;
  stroke-width: 3;
}

.line-chart-dot-secondary {
  fill: #ffffff;
  stroke: #273463;
  stroke-width: 3;
}

.line-chart-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 10px;
}

.line-chart-label {
  display: grid;
  gap: 4px;
  text-align: center;
}

.line-chart-label strong {
  font-weight: 800;
}

.line-chart-value-company {
  color: #d7111b;
}

.line-chart-value-rep {
  color: #273463;
}

.trend-point strong,
.mix-pct {
  color: var(--brand-navy);
  font-weight: 800;
}

.mix-track.sale span {
  background: linear-gradient(90deg, #ff1822, #d7111b);
}

.mix-track-rep {
  height: 8px;
  background: rgba(39, 52, 99, 0.1);
}

.mix-track-rep span {
  background: linear-gradient(90deg, #273463, #1b1b37);
}

.mix-track.go_back span {
  background: linear-gradient(90deg, #ff7a18, #ff4d00);
}

.mix-track.not_home span {
  background: linear-gradient(90deg, #3a63ff, #273463);
}

.mix-track.no span {
  background: linear-gradient(90deg, #7b859f, #5f6880);
}

.mix-track.other span {
  background: linear-gradient(90deg, #9f7aea, #6b46c1);
}

.page-heading {
  margin-bottom: 18px;
  align-items: flex-end;
}

.period-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

input,
select {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  padding: 10px 12px;
  font: inherit;
  color: var(--brand-navy);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(39, 52, 99, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.privacy-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 24, 34, 0.16);
  border-radius: 18px;
  background: rgba(255, 24, 34, 0.06);
  color: var(--brand-navy);
}

.table-card {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

thead th {
  background: rgba(238, 242, 255, 0.88);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.sort-link.active {
  color: var(--brand-navy);
}

.sort-indicator {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--accent);
}

tbody tr:hover {
  background: rgba(238, 242, 255, 0.55);
}

.viewer-row-cell strong {
  color: var(--accent-strong);
}

@media (max-width: 900px) {
  .site-header,
  .page-heading,
  .hero {
    flex-direction: column;
  }

  .public-hero,
  .public-stat-band,
  .public-grid-three,
  .public-grid-two,
  .role-columns,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: stretch;
  }

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

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

  .dashboard-card-wide {
    grid-column: span 1;
  }

  .table-card {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .site-header,
  .hero-copy,
  .hero-panel {
    padding: 22px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 44px;
    height: 56px;
  }

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

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

  .public-proof {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 14px 12px;
  }
}
