.gtm-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.gtm-hero,
.gtm-detail-head,
.gtm-history-card,
.gtm-chart-wrap,
.gtm-component-card,
.gtm-dashboard-card,
.gtm-loading-card,
.gtm-error-card {
  border: 1px solid rgba(16, 164, 179, 0.28);
  background:
    linear-gradient(180deg, rgba(6, 24, 39, 0.96), rgba(5, 20, 33, 0.92)),
    radial-gradient(circle at top right, rgba(198, 255, 58, 0.12), transparent 28%);
  border-radius: 1.75rem;
  box-shadow: 0 20px 48px rgba(1, 12, 22, 0.32);
}

.gtm-hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  padding: 1.75rem;
}

.gtm-hero-copy,
.gtm-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gtm-kicker,
.gtm-card-eyebrow {
  margin: 0;
  color: #7df3d1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gtm-title {
  margin: 0;
  color: #f0f6ff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.gtm-subtitle,
.gtm-dashboard-copy,
.gtm-note,
.gtm-sync-message,
.gtm-meta-copy {
  margin: 0;
  color: rgba(240, 246, 255, 0.78);
  line-height: 1.6;
}

.gtm-error-inline {
  margin: 0;
  color: #ffb2d1;
}

.gtm-hero-side,
.gtm-stat-grid,
.gtm-dashboard-grid,
.gtm-component-grid,
.gtm-history-table,
.gtm-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.gtm-stat-card,
.gtm-metric-card,
.gtm-component-row,
.gtm-focus-grid .gtm-metric-card {
  border: 1px solid rgba(16, 164, 179, 0.18);
  background: rgba(10, 31, 49, 0.9);
  border-radius: 1.2rem;
  padding: 1rem 1.1rem;
}

.gtm-stat-label,
.gtm-metric-label {
  display: block;
  color: rgba(240, 246, 255, 0.62);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gtm-stat-value,
.gtm-metric-value {
  display: block;
  margin-top: 0.35rem;
  color: #f0f6ff;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1.1;
}

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

.gtm-dashboard-card {
  text-align: left;
  padding: 1.35rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.gtm-dashboard-card:hover,
.gtm-metric-card:hover,
.gtm-component-row:hover,
.gtm-back-link:hover {
  transform: translateY(-1px);
}

.gtm-dashboard-head,
.gtm-detail-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.gtm-dashboard-head-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.gtm-dashboard-title {
  margin: 0.35rem 0 0.45rem;
  color: #f0f6ff;
  font-size: 1.6rem;
  line-height: 1.1;
  min-height: 2.2em;
}

.gtm-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(198, 255, 58, 0.24);
  color: #c6ff3a;
  background: rgba(198, 255, 58, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gtm-sparkline-wrap {
  margin: 1rem 0 1.1rem;
  min-height: 86px;
  border-radius: 1.15rem;
  border: 1px solid rgba(16, 164, 179, 0.14);
  background: rgba(6, 24, 39, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gtm-sparkline {
  width: 100%;
  height: 82px;
}

.gtm-sparkline-guide,
.gtm-chart-grid {
  fill: none;
  stroke: rgba(240, 246, 255, 0.12);
  stroke-width: 1;
}

.gtm-sparkline-line,
.gtm-chart-line {
  fill: none;
  stroke: #7df3d1;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gtm-sparkline-empty,
.gtm-empty-copy,
.gtm-chart-empty {
  color: rgba(240, 246, 255, 0.62);
  font-size: 0.95rem;
  text-align: center;
}

.gtm-dashboard-metrics,
.gtm-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.gtm-metric-card,
.gtm-component-row,
.gtm-back-link {
  appearance: none;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.gtm-metric-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.gtm-metric-card-top,
.gtm-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.gtm-metric-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.42rem 0.5rem;
}

.gtm-metric-chip-wrap {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 1.32rem;
  align-self: start;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 0.18rem;
  max-width: 8.8rem;
}

.gtm-metric-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  color: rgba(240, 246, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-transform: none;
  line-height: 1.2;
  min-height: 3.65em;
  margin: 0;
}

.gtm-performance-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 999px;
  padding: 0.16rem 0.44rem;
  border: 1px solid rgba(240, 246, 255, 0.16);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.12;
}

.gtm-info-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(240, 246, 255, 0.2);
  background: rgba(240, 246, 255, 0.07);
  color: rgba(240, 246, 255, 0.8);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  min-height: 1.26rem;
}

.gtm-info-chip {
  width: 1.18rem;
  height: 1.18rem;
  padding: 0;
  border-color: rgba(16, 164, 179, 0.36);
  background: rgba(16, 164, 179, 0.14);
  color: rgba(192, 245, 255, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(7, 22, 38, 0.45);
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.gtm-info-chip:hover {
  border-color: rgba(125, 243, 209, 0.42);
  background: rgba(125, 243, 209, 0.2);
  color: #d5fffb;
}

.gtm-info-chip.is-active {
  border-color: rgba(198, 255, 58, 0.44);
  background: rgba(198, 255, 58, 0.2);
  color: #ecffb5;
}

.gtm-performance-chip-green {
  border-color: rgba(105, 240, 143, 0.34);
  background: rgba(105, 240, 143, 0.12);
  color: #69f08f;
}

.gtm-performance-chip-yellow {
  border-color: rgba(255, 211, 107, 0.32);
  background: rgba(255, 211, 107, 0.12);
  color: #ffd36b;
}

.gtm-performance-chip-red {
  border-color: rgba(255, 143, 171, 0.32);
  background: rgba(255, 143, 171, 0.12);
  color: #ff8fab;
}

.gtm-performance-chip-neutral {
  border-color: rgba(240, 246, 255, 0.18);
  background: rgba(240, 246, 255, 0.08);
  color: rgba(240, 246, 255, 0.74);
}

.gtm-metric-delta {
  display: inline-flex;
  margin-top: 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.gtm-metric-delta-up {
  color: #8dff7a;
}

.gtm-metric-delta-down {
  color: #ff8ab7;
}

.gtm-metric-delta-neutral {
  color: rgba(240, 246, 255, 0.68);
}

.gtm-goal-note {
  display: block;
  margin-top: 0.42rem;
  color: rgba(240, 246, 255, 0.6);
  font-size: 0.86rem;
  line-height: 1.45;
}

.gtm-inline-tooltip {
  margin-top: 0.5rem;
  border: 1px solid rgba(16, 164, 179, 0.28);
  border-radius: 0.82rem;
  background: rgba(6, 24, 39, 0.9);
  padding: 0.5rem 0.62rem;
  color: rgba(240, 246, 255, 0.84);
  font-size: 0.82rem;
  line-height: 1.45;
}

.gtm-inline-tooltip-title {
  margin: 0;
  color: rgba(240, 246, 255, 0.82);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gtm-inline-tooltip-body {
  margin: 0.2rem 0 0;
  color: rgba(240, 246, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.42;
}

.gtm-progress-track {
  width: 100%;
  height: 0.42rem;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: rgba(240, 246, 255, 0.12);
  overflow: hidden;
}

.gtm-progress-fill {
  height: 100%;
  border-radius: 999px;
}

.gtm-progress-fill-green,
.gtm-bar-fill-green,
.gtm-vbar-fill-green,
.gtm-table-pill-green {
  background: linear-gradient(90deg, rgba(105, 240, 143, 0.8), #69f08f);
}

.gtm-progress-fill-yellow,
.gtm-bar-fill-yellow,
.gtm-vbar-fill-yellow,
.gtm-table-pill-yellow {
  background: linear-gradient(90deg, rgba(255, 211, 107, 0.78), #ffd36b);
}

.gtm-progress-fill-red,
.gtm-bar-fill-red,
.gtm-vbar-fill-red,
.gtm-table-pill-red {
  background: linear-gradient(90deg, rgba(255, 143, 171, 0.78), #ff8fab);
}

.gtm-progress-fill-neutral,
.gtm-bar-fill-neutral,
.gtm-vbar-fill-neutral,
.gtm-table-pill-neutral {
  background: linear-gradient(90deg, rgba(125, 243, 209, 0.78), #7df3d1);
}

.gtm-dashboard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.9rem;
  color: rgba(240, 246, 255, 0.66);
  font-size: 0.92rem;
}

.gtm-detail-head {
  padding: 1.5rem;
}

.gtm-back-link {
  width: auto;
  border: none;
  background: transparent;
  padding: 0;
  color: #7df3d1;
  font-size: 0.95rem;
  font-weight: 600;
}

.gtm-detail-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.gtm-dashboard-image-wrap {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(16, 164, 179, 0.18);
  background: rgba(6, 24, 39, 0.74);
}

.gtm-dashboard-image {
  display: block;
  width: 100%;
  height: auto;
}

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

.gtm-component-card {
  padding: 1.2rem;
}

.gtm-report-title {
  margin: 0.35rem 0 0;
  color: #f0f6ff;
  font-size: 1.18rem;
  line-height: 1.2;
}

.gtm-report-preview {
  margin-top: 1rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(16, 164, 179, 0.14);
  background: rgba(7, 24, 39, 0.62);
  padding: 1rem;
}

.gtm-report-preview-gauge {
  padding-bottom: 0.6rem;
}

.gtm-gauge-preview,
.gtm-line-preview {
  width: 100%;
  height: auto;
}

.gtm-gauge-preview text {
  fill: #f0f6ff;
  font-size: 11px;
}

.gtm-report-preview-copy,
.gtm-report-metric-head,
.gtm-report-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.gtm-report-preview-copy,
.gtm-report-meta {
  margin-top: 0.8rem;
  color: rgba(240, 246, 255, 0.68);
  font-size: 0.86rem;
  line-height: 1.5;
}

.gtm-report-meta {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.9rem;
}

.gtm-report-metric-head strong,
.gtm-report-preview-copy strong {
  color: #f0f6ff;
}

.gtm-donut-preview {
  position: relative;
  width: 5.6rem;
  height: 5.6rem;
  margin: 0 auto;
  border-radius: 999px;
}

.gtm-donut-hole {
  position: absolute;
  inset: 0.72rem;
  border-radius: 999px;
  background: rgba(5, 20, 33, 0.94);
}

.gtm-donut-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f6ff;
  font-size: 0.92rem;
  font-weight: 700;
}

.gtm-bar-preview {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.gtm-bar-row {
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(240, 246, 255, 0.08);
  overflow: hidden;
}

.gtm-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.gtm-vbar-preview {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  height: 7.2rem;
}

.gtm-vbar-track {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 1rem 1rem 0.4rem 0.4rem;
  background: rgba(240, 246, 255, 0.08);
  overflow: hidden;
}

.gtm-vbar-fill {
  width: 100%;
  border-radius: 1rem 1rem 0.4rem 0.4rem;
}

.gtm-table-preview {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gtm-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 0.9rem;
  background: rgba(240, 246, 255, 0.06);
  padding: 0.72rem 0.85rem;
  color: rgba(240, 246, 255, 0.72);
  font-size: 0.86rem;
}

.gtm-table-pill {
  display: inline-flex;
  width: 2.5rem;
  height: 0.5rem;
  border-radius: 999px;
}

.gtm-component-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.gtm-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: rgba(240, 246, 255, 0.78);
}

.gtm-form-field-inline {
  flex-direction: row;
  align-items: center;
}

.gtm-textarea {
  min-height: 280px;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(16, 164, 179, 0.24);
  background: rgba(8, 24, 39, 0.84);
  color: #f0f6ff;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.gtm-textarea-small {
  min-height: 120px;
}

.gtm-component-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.gtm-component-main {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-width: 0;
  flex: 1 1 auto;
}

.gtm-component-row strong,
.gtm-component-title-text,
.gtm-component-value-wrap > span:last-child {
  color: #f0f6ff;
}

.gtm-component-title-wrap {
  display: block;
  min-width: 0;
}

.gtm-component-title-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.24;
}

.gtm-component-row small {
  display: block;
  margin-top: 0.28rem;
  color: rgba(240, 246, 255, 0.64);
}

.gtm-component-value-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.34rem;
  flex: 0 0 auto;
  min-width: 0;
}

.gtm-metric-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.gtm-chart-wrap {
  padding: 1rem;
}

.gtm-trend-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.78rem;
  flex-wrap: wrap;
}

.gtm-trend-chip {
  appearance: none;
  border: 1px solid rgba(240, 246, 255, 0.18);
  background: rgba(240, 246, 255, 0.06);
  color: rgba(240, 246, 255, 0.76);
  border-radius: 999px;
  padding: 0.26rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.gtm-trend-chip:hover {
  border-color: rgba(16, 164, 179, 0.38);
}

.gtm-trend-chip.is-active {
  border-color: rgba(198, 255, 58, 0.36);
  background: rgba(198, 255, 58, 0.14);
  color: #c6ff3a;
}

.gtm-chart {
  width: 100%;
  height: auto;
}

.gtm-chart text {
  fill: rgba(240, 246, 255, 0.54);
  font-size: 11px;
}

.gtm-chart-goal {
  fill: none;
  stroke: rgba(240, 246, 255, 0.44);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.gtm-history-card {
  padding: 1.25rem;
}

.gtm-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(10, 31, 49, 0.84);
  border: 1px solid rgba(16, 164, 179, 0.14);
  color: rgba(240, 246, 255, 0.76);
}

.gtm-history-row strong {
  color: #f0f6ff;
}

.gtm-loading-card,
.gtm-error-card {
  min-height: 280px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}

.gtm-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(16, 164, 179, 0.2);
  border-top-color: #7df3d1;
  animation: gtm-spin 0.9s linear infinite;
}

@keyframes gtm-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .gtm-hero,
  .gtm-dashboard-grid,
  .gtm-component-grid,
  .gtm-dashboard-metrics,
  .gtm-focus-grid,
  .gtm-metric-summary-grid {
    grid-template-columns: 1fr;
  }

  .gtm-detail-head,
  .gtm-dashboard-head {
    flex-direction: column;
  }

  .gtm-detail-meta {
    align-items: flex-start;
  }

  .gtm-report-head,
  .gtm-metric-card-top,
  .gtm-report-preview-copy,
  .gtm-report-metric-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gtm-metric-card-top {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .gtm-metric-chip-wrap {
    justify-content: flex-start;
    max-width: 100%;
  }
}
