:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --soft: #f8fafc;
  --line: #dde3ee;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2563eb;
  --compare: #9ca3af;
  --red: #dc2626;
  --green: #16a34a;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body[data-static-case="true"] #refreshTodayData,
body[data-static-case="true"] .material-launch-strip,
body[data-static-case="true"] .material-select {
  display: none;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 700;
}

.primary-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.secondary-button,
.icon-button {
  background: #fff;
  color: var(--text);
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 12px;
}

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

.refresh-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.refresh-button.is-refreshing {
  color: var(--brand);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.subtle {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  color: var(--muted);
  white-space: nowrap;
}

.page-nav {
  display: flex;
  gap: 8px;
  padding: 0 28px;
  margin-bottom: 12px;
}

.page-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.page-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.shell {
  padding: 0 28px 32px;
}

.page {
  display: grid;
  gap: 16px;
}

.page.is-hidden {
  display: none;
}

.band {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 18px;
}

.band-head,
.table-title,
.panel-head,
.chart-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.band-head,
.table-title,
.panel-head {
  margin-bottom: 14px;
}

.filters {
  display: grid;
  gap: 14px;
}

.material-filters {
  grid-template-columns: minmax(320px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
}

.material-filter-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.material-launch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.material-launch-strip > div:first-child {
  display: grid;
  gap: 2px;
}

.material-launch-strip strong {
  font-size: 15px;
}

.material-launch-strip span {
  color: var(--muted);
  font-size: 12px;
}

.material-launch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters label,
.level-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
}

.fixed-chip,
.hour-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  color: var(--text);
}

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

.kpi {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.kpi .label {
  color: var(--muted);
  font-size: 12px;
}

.metric-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

.delta {
  font-size: 12px;
  white-space: nowrap;
}

.delta.growth {
  color: var(--red);
}

.delta.decline {
  color: var(--green);
}

.delta.neutral {
  color: var(--muted);
}

.chart-card,
.cursor-panel,
.table-block,
.pie-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.chart-card {
  min-width: 0;
}

.cursor-panel {
  min-width: 0;
  height: 100%;
  align-self: stretch;
}

.chart-card svg {
  display: block;
  width: 100%;
  height: 300px;
}

.axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.gridline {
  stroke: #edf1f7;
  stroke-width: 1;
}

.axis-line {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.empty-note {
  fill: var(--muted);
  font-size: 14px;
}

.cursor-strip {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.cursor-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 10px 12px;
}

.cursor-row span:first-child {
  color: var(--muted);
  font-size: 12px;
}

.cursor-row strong {
  justify-self: end;
  font-size: 15px;
}

.compare-chip {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.level-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.level-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.level-card h3 {
  margin-bottom: 8px;
}

.level-card .mini-stats {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.product-consumption-board {
  display: grid;
  gap: 14px;
}

.product-consumption-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 12px;
  align-items: stretch;
}

.rank-table-panel {
  display: grid;
  gap: 10px;
}

.product-consumption-bottom {
  display: flex;
  justify-content: center;
}

.centered-pie-card {
  width: min(100%, 980px);
}

.pie-wrap {
  display: grid;
  gap: 10px;
}

.pie-card svg {
  display: block;
  width: 100%;
  height: 280px;
}

.pie-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pie-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pie-leader {
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.78;
}

.pie-label-name {
  fill: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.pie-label-value {
  fill: var(--muted);
  font-size: 11px;
}

.pie-center-label {
  fill: var(--muted);
  font-size: 12px;
}

.pie-center-value {
  fill: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.table-shell {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rank-chart-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}

.rank-chart-shell svg {
  display: block;
  width: 100%;
  min-width: 760px;
}

.product-rank-label {
  font-size: 12px;
}

.rank-value {
  fill: var(--text);
  font-size: 12px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1020px;
  background: #fff;
}

.compact table {
  min-width: 720px;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--soft);
  z-index: 1;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:hover {
  background: #f9fbff;
}

.cell-main {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
}

.product-name {
  font-weight: 600;
}

.material-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.material-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.material-lane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

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

.lane-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.lane-list {
  display: grid;
  gap: 10px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(620px, 1fr));
  gap: 12px;
}

.material-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

.material-card.is-compact {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.material-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
  position: relative;
}

.material-cover-button {
  display: block;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

.material-cover-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.material-play-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.26);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.material-cover-placeholder {
  display: grid;
  align-content: end;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(15, 23, 42, 0.4)),
    var(--cover);
}

.material-cover-placeholder span {
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.material-cover-placeholder small {
  font-size: 11px;
  opacity: 0.86;
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-online-cover {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #111827;
}

.material-online-cover iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.material-online-cover-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.84);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.material-video-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-width: min(1040px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}

.material-video-dialog .launch-head {
  flex: 0 0 auto;
}

.material-video-dialog .launch-body {
  overflow: hidden;
}

.material-video-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: center;
  min-height: 0;
}

.material-video-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 190px);
}

.material-video-player {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background: #020617;
}

.material-video-frame {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #020617;
}

.material-video-frame.is-landscape,
.material-video-player.is-landscape {
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: calc(100vh - 190px);
}

.material-video-frame.is-portrait,
.material-video-player.is-portrait {
  width: auto;
  height: min(70vh, 660px);
  aspect-ratio: 9 / 16;
  min-height: 0;
  margin: 0 auto;
  object-fit: contain;
}

.material-video-poster {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 360px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--soft);
  overflow: hidden;
}

.material-video-poster img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.material-video-meta {
  display: grid;
  gap: 6px;
  align-content: start;
  margin-top: 0;
  min-width: 0;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.material-video-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.material-video-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: #fff;
}

.material-video-meta span,
.material-video-meta small {
  color: var(--muted);
}

.material-video-meta a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.material-main {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.material-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.material-title-left {
  display: grid;
  gap: 8px;
  min-width: min(100%, 360px);
  flex: 1 1 360px;
}

.material-title-row h3 {
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.material-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.material-select input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.material-select small {
  color: var(--muted);
  font-weight: 600;
}

.material-product-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-tags span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.material-status {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.material-status.keep {
  color: #166534;
  background: #dcfce7;
}

.material-status.watch {
  color: #92400e;
  background: #fef3c7;
}

.material-status.stop {
  color: #991b1b;
  background: #fee2e2;
}

.material-status.retest {
  color: #1d4ed8;
  background: #dbeafe;
}

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

.material-metrics div,
.detail-grid div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 8px;
  min-width: 0;
}

.material-metrics span,
.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.material-metrics strong,
.detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.material-period-compare div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.material-period-compare span {
  color: var(--muted);
  font-size: 12px;
}

.material-period-compare strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.material-detail {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.material-detail summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

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

.material-action {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--text);
}

.material-action span {
  color: var(--text);
}

.material-action small {
  color: var(--muted);
}

.priority-action {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.empty-material {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.launch-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.36);
}

.launch-modal.is-hidden {
  display: none;
}

.launch-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  width: min(440px, calc(100vw - 24px));
  pointer-events: none;
}

.launch-panel.is-collapsed {
  top: 86px;
  bottom: auto;
  width: auto;
}

.launch-panel.is-hidden {
  display: none;
}

.launch-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  padding: 18px;
}

.launch-panel .launch-dialog {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
}

.launch-panel.is-collapsed .launch-dialog {
  display: none;
}

.launch-head,
.launch-footer,
.launch-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.launch-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.launch-collapse-button {
  min-height: 38px;
}

.launch-modal .launch-collapse-button {
  display: none;
}

.launch-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.launch-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.launch-steps span.is-active {
  border-color: var(--brand);
  background: #eff6ff;
  color: var(--brand);
}

.launch-body {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 180px;
  padding-right: 2px;
}

.launch-panel .launch-body {
  min-height: 0;
}

.launch-collapsed-tab {
  display: none;
  pointer-events: auto;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 12px 0 0 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.18);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.launch-collapsed-tab strong,
.launch-collapsed-tab span {
  display: block;
  white-space: nowrap;
}

.launch-collapsed-tab span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.launch-panel.is-collapsed .launch-collapsed-tab {
  display: block;
}

.launch-footer > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.launch-note,
.launch-warning,
.launch-error {
  border-radius: 10px;
  padding: 12px;
}

.launch-note {
  background: var(--soft);
  color: var(--muted);
}

.launch-warning {
  display: grid;
  gap: 6px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.launch-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.launch-progress-card {
  display: grid;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 14px;
}

.launch-progress-card strong,
.launch-progress-card span {
  display: block;
}

.launch-progress-card span {
  color: #475569;
  line-height: 1.55;
}

.launch-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
}

.launch-progress-bar span {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  animation: launch-progress-slide 1.2s ease-in-out infinite;
}

@keyframes launch-progress-slide {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(250%);
  }
}

.launch-result-summary {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.launch-result-summary strong,
.launch-result-summary span {
  display: block;
}

.launch-result-summary > div:first-child {
  display: grid;
  gap: 4px;
}

.launch-result-summary > div:first-child strong {
  font-size: 18px;
}

.launch-result-summary.is-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.launch-result-summary.is-partial {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.launch-result-summary.is-failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.launch-result-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.launch-result-kpis div {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
}

.launch-result-kpis span {
  font-size: 12px;
  opacity: 0.84;
}

.launch-selected-list,
.launch-group-list {
  display: grid;
  gap: 10px;
}

.launch-material-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.launch-ad-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.launch-ad-row > strong {
  justify-self: end;
}

.launch-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
}

.launch-material-row strong,
.launch-material-row span,
.launch-ad-row span,
.launch-ad-row small {
  display: block;
  overflow-wrap: anywhere;
}

.launch-material-row span,
.launch-ad-row small,
.launch-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.launch-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.launch-settings-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.launch-template-grid div,
.launch-settings-panel label,
.launch-settings-panel div,
.launch-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 10px;
}

.launch-template-grid span,
.launch-settings-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.launch-settings-panel input,
.launch-settings-panel select {
  width: 100%;
  min-width: 0;
  background: #fff;
}

.launch-group {
  display: grid;
  gap: 8px;
}

.launch-ad-row {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1fr);
  background: #fff;
}

.launch-group.has-error {
  border-color: #fecaca;
}

.launch-ad-row.has-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.launch-attempts {
  margin-top: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 8px;
}

.launch-attempts summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.launch-attempts div {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.launch-attempts p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.launch-attempts p:first-child {
  border-top: 0;
  padding-top: 0;
}

.launch-attempts strong,
.launch-attempts span,
.launch-attempts small {
  display: block;
  overflow-wrap: anywhere;
}

.launch-success-text,
.launch-fail-text {
  align-self: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.launch-success-text {
  background: #dcfce7;
  color: #166534;
}

.launch-fail-text {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 1100px) {
  .material-filters,
  .kpis,
  .level-cards,
  .material-kpis,
  .material-lanes,
  .product-consumption-top,
  .pie-wrap,
  .cursor-strip {
    grid-template-columns: 1fr;
  }

  .topbar,
  .band-head,
  .table-title,
  .panel-head,
  .chart-meta,
  .material-launch-strip,
  .launch-head,
  .launch-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 22px 18px 10px;
  }

  .page-nav,
  .shell {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .material-grid,
  .material-card,
  .material-card.is-compact {
    grid-template-columns: 1fr;
  }

  .material-cover {
    max-width: 180px;
  }

  .launch-modal {
    padding: 12px;
  }

  .launch-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: min(78vh, 680px);
  }

  .launch-panel.is-collapsed {
    top: auto;
    left: auto;
    bottom: 18px;
    width: auto;
    height: auto;
  }

  .launch-collapsed-tab {
    border-radius: 12px 0 0 12px;
  }

  .launch-dialog {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .launch-ad-row {
    grid-template-columns: 1fr;
  }

  .launch-ad-row > strong {
    justify-self: start;
  }

  .material-video-layout {
    grid-template-columns: 1fr;
  }

  .material-video-stage,
  .material-video-meta {
    max-height: none;
  }

  .material-video-frame.is-portrait,
  .material-video-player.is-portrait {
    width: auto;
    height: min(58vh, 520px);
    min-height: 0;
  }

  .range span {
    display: none;
  }

  h1 {
    font-size: 26px;
  }
}
