/* ADR-0325 / ADR-0277: artwork and palette belong solely to this dashboard. */
/* sd-palette:begin */
.sd-dashboard {
  --sd-navy: #071227;
  --sd-panel: #0b1b32df;
  --sd-header: #071227ed;
  --sd-text: #f6f8ff;
  --sd-muted: #a9b9d3;
  --sd-blue: #0096f0;
  --sd-red: #ff4200;
  --sd-accent: var(--sd-red);
  --sd-control-active: var(--sd-red);
  --sd-control-active-text: var(--sd-text);
  --sd-gold: #f4c76b;
  --sd-holiday-gold: #f9d690;
  --sd-holiday-accent: #e4b867;
  --sd-line: #879fbe66;
  --sd-track: #334a65;
  --sd-revenue: #0041a0eb;
  --sd-shadow: #00000080;
  --sd-focus: #ffffff;
}
/* sd-palette:end */

.sd-dashboard[data-season="holiday"] {
  --sd-gold: var(--sd-holiday-gold);
  --sd-accent: var(--sd-holiday-accent);
  --sd-control-active: var(--sd-holiday-gold);
  --sd-control-active-text: var(--sd-navy);
}

.sd-screen-host {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.sd-screen-host > .sd-dashboard {
  flex: 1 0 auto;
}

.sd-state {
  position: relative;
  min-height: clamp(240px, 40vh, 420px);
  flex-shrink: 0;
}

.sd-state .state,
.sd-screen-host > .state {
  position: relative;
  inset: auto;
  min-height: 240px;
  width: 100%;
}

.sd-dashboard {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: auto;
  display: flow-root;
  padding: clamp(16px, 3vw, 36px);
  padding-bottom: 22%;
  background-color: var(--sd-navy);
  color: var(--sd-text);
  font-family: Arial, sans-serif;
  line-height: 1.5;
  overflow-wrap: anywhere;
  border-radius: 4px;
}

.sd-dashboard::before {
  content: "";
  position: absolute;
  /* The scene is a 16:9 strip pinned to the bottom edge; on a tall screen the
     navy of the root fills the space above it, and the strip fades into it. */
  inset: auto 0 0 0;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, var(--sd-text) 28%);
  mask-image: linear-gradient(to bottom, transparent, var(--sd-text) 28%);
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background-image: url("/assets/sales-doomsday/background-battle.jpg");
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: center bottom;
}

.sd-dashboard[data-season="holiday"]::before,
.sd-dashboard.is-holiday::before {
  background-image: url("/assets/sales-doomsday/background-holiday.jpg");
}

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

.sd-dashboard h1,
.sd-dashboard h2,
.sd-dashboard h3,
.sd-dashboard p {
  margin: 0;
}

.sd-dashboard h1 {
  font-size: clamp(32px, 4.7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 3px 18px var(--sd-shadow);
}

.sd-dashboard h2 {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
}

.sd-dashboard h3 {
  font-size: 24px;
  line-height: 1.3;
}

.sd-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: calc(clamp(16px, 3vw, 36px) * -1);
  margin-bottom: 28px;
  padding: 22px clamp(16px, 3vw, 36px);
  background: var(--sd-header);
  border-bottom: 1px solid var(--sd-accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sd-header img {
  width: min(240px, 100%);
  height: auto;
  object-fit: contain;
}

.sd-logo {
  width: min(240px, 100%);
  height: 45px;
  flex-shrink: 0;
  background-image: url("/assets/sales-doomsday/logo.png");
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
  font-size: 0;
}

.sd-headquarters {
  padding-left: 18px;
  border-left: 1px solid var(--sd-line);
  color: var(--sd-muted);
}

.sd-mission {
  margin-left: auto;
  color: var(--sd-gold);
}

.sd-kicker {
  grid-column: 1;
  grid-row: 1;
  color: var(--sd-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sd-title {
  grid-column: 1;
  grid-row: 2;
}

.sd-motivation {
  grid-column: 1;
  grid-row: 3;
  margin-top: 18px;
  max-width: 36ch;
  padding: 10px 12px;
  background: var(--sd-header);
}

.sd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 24px;
  min-height: clamp(380px, 48vw, 640px);
}

.sd-panel,
.sd-dashboard [data-countdown],
.sd-countdown {
  min-width: 0;
  padding: clamp(16px, 2vw, 24px);
  background: var(--sd-panel);
  border-top: 2px solid var(--sd-accent);
}

.sd-dashboard [data-countdown] {
  grid-column: 2;
  grid-row: 1 / span 3;
  font-variant-numeric: tabular-nums;
}

.sd-countdown-label {
  color: var(--sd-text);
  font-size: 16px;
  font-weight: 700;
}

.sd-countdown-units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block: 18px;
}

.sd-countdown-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.sd-countdown-unit + .sd-countdown-unit::before {
  position: absolute;
  left: -6px;
  top: 0;
  content: ":";
  color: var(--sd-muted);
  font-size: clamp(26px, 3.4vw, 42px);
}

.sd-countdown-value {
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
}

.sd-countdown-unit-label,
.sd-countdown-details {
  color: var(--sd-muted);
  font-size: 12px;
  font-weight: 400;
}

.sd-countdown-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sd-dashboard button,
.sd-dashboard select {
  max-width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--sd-line);
  border-radius: 3px;
  background: var(--sd-header);
  color: var(--sd-text);
  font: inherit;
  cursor: pointer;
  white-space: normal;
}

.sd-dashboard button[aria-pressed="true"] {
  background: var(--sd-control-active);
  border-color: var(--sd-accent);
  color: var(--sd-control-active-text);
}

.sd-dashboard button:disabled {
  opacity: 0.65;
  cursor: default;
}

.sd-dashboard :focus-visible {
  outline: 3px solid var(--sd-focus);
  outline-offset: 4px;
}

.sd-dashboard [data-season-controls],
.sd-season-controls {
  display: block;
  gap: 10px;
  margin: 12px 0;
  padding: 8px 12px;
  background: var(--sd-header);
  border-left: 2px solid var(--sd-accent);
}

.sd-dashboard [data-season-controls]:empty { display: none; }

.sd-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  justify-content: flex-end;
  padding-block: 4px;
}

.sd-control-group + .sd-control-group {
  border-top: 1px solid var(--sd-line);
}

.sd-dashboard .sd-control-group-title {
  margin-right: auto;
  font-size: 12px;
}

.sd-example-controls {
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--sd-header);
}

.sd-season-controls .sd-preview-notice {
  margin: 0;
  padding: 4px 8px;
  font-size: 11px;
}

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

.sd-thresholds,
.sd-leaders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-block: 22px;
}

.sd-threshold {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 14px;
}

.sd-threshold .sd-gauge {
  grid-column: 1;
  grid-row: 3;
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  overflow: visible;
}

.sd-gauge-track {
  stroke: var(--sd-track);
  stroke-width: 12;
}

.sd-gauge-fill {
  stroke: var(--sd-blue);
  stroke-width: 12;
  transition: stroke-dasharray 0.35s ease;
}

.sd-threshold:nth-child(2) .sd-gauge-fill {
  stroke: var(--sd-red);
}

.sd-threshold.is-achieved {
  border-color: var(--sd-gold);
}

.sd-threshold.is-achieved .sd-gauge-fill,
.sd-threshold.is-achieved .sd-trophy {
  stroke: var(--sd-gold);
  color: var(--sd-gold);
}

.sd-leader {
  min-width: 0;
  border-top-color: var(--sd-gold);
  overflow-wrap: anywhere;
}

.sd-nomination {
  border-top-color: var(--sd-gold);
}

.sd-nomination-title {
  color: var(--sd-gold);
  margin-bottom: 20px;
}

.sd-leader + .sd-leader {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--sd-line);
}

.sd-leader-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-block: 12px;
}

.sd-leader-metric {
  font-size: clamp(23px, 2.7vw, 34px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  margin-block: 14px 6px;
}

.sd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--sd-gold);
  border-radius: 50%;
  background: var(--sd-navy);
  color: var(--sd-text);
  font-size: 22px;
}

.sd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sd-summary {
  padding: 20px;
  background: var(--sd-revenue);
  border-right: 6px solid var(--sd-accent);
  margin-block: 18px;
  font-variant-numeric: tabular-nums;
}

.sd-summary-heading,
.sd-threshold-heading,
.sd-threshold-limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.sd-summary-heading {
  align-items: flex-start;
}

.sd-source-badge {
  display: inline-block;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--sd-gold);
  background: var(--sd-header);
  color: var(--sd-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sd-revenue {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
}

.sd-note,
.sd-warning,
.sd-demo-banner,
.sd-roster-notice,
.sd-footer {
  margin-block: 12px;
  padding: 10px 12px;
  background: var(--sd-header);
  color: var(--sd-muted);
  font-size: 13px;
}

.sd-warning {
  border-left: 3px solid var(--sd-gold);
}

.sd-trophy,
.sd-award {
  color: var(--sd-gold);
}

.sd-trophy {
  display: inline-block;
  width: 32px;
  height: 32px;
  max-width: 100%;
  flex-shrink: 0;
  grid-column: auto;
  grid-row: auto;
}

.sd-leaders-title {
  margin-top: 38px;
  padding: 14px 12px;
  border-top: 1px solid var(--sd-accent);
  background: var(--sd-header);
}

.sd-threshold-target,
.sd-threshold-remaining,
.sd-threshold-excess-value {
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sd-threshold-progress {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  justify-self: center;
  margin-bottom: 20px;
  text-align: center;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sd-threshold-progress-caption {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--sd-muted);
}

.sd-threshold-caption,
.sd-threshold-label,
.sd-threshold-status,
.sd-threshold-scale,
.sd-threshold-limit {
  color: var(--sd-muted);
  font-size: 12px;
  font-weight: 400;
}

.sd-threshold-excess-value {
  display: block;
}

.sd-threshold.is-achieved .sd-threshold-result {
  color: var(--sd-gold);
  font-size: 16px;
  font-weight: 700;
}

.sd-dashboard .sd-profile-warnings-title {
  padding: 10px 12px;
  background: var(--sd-header);
  color: var(--sd-muted);
  font-size: 14px;
}

.sd-source,
.sd-period,
.sd-computed-at,
.sd-threshold-result,
.sd-leader-status {
  color: var(--sd-muted);
  font-size: 13px;
}

@media (max-width: 740px) {
  .sd-dashboard::before {
    /* Keep the lower inspection-camera scene in the narrow portrait crop. */
    inset: 0;
    aspect-ratio: auto;
    -webkit-mask-image: none;
    mask-image: none;
    background-size: cover;
    background-position: 70% bottom;
  }

  .sd-dashboard {
    padding-bottom: 34%;
  }

  .sd-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 600px;
    align-content: space-between;
    padding-bottom: 18px;
  }

  .sd-motivation,
  .sd-kicker,
  .sd-title,
  .sd-dashboard [data-countdown] {
    grid-column: 1;
    grid-row: auto;
  }

  .sd-thresholds,
  .sd-leaders {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd-threshold {
    padding-inline: 20px;
  }

  .sd-threshold .sd-gauge {
    max-width: 360px;
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-dashboard *,
  .sd-dashboard *::before,
  .sd-dashboard *::after {
    animation: none;
    transition: none;
  }
}
