.shell--command-center {
  width: min(100%, 900px);
  padding-top: 18px;
}

.cc-shell {
  position: relative;
  overflow: hidden;
  padding: 22px 18px 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(235, 247, 236, 0.92)),
    radial-gradient(circle at top right, rgba(20, 114, 255, 0.08), transparent 36%);
}

.cc-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 199, 85, 0.18), transparent 70%);
  transform: translate(-34%, -34%);
  pointer-events: none;
}

.cc-header,
.cc-widget,
.cc-stale-banner {
  position: relative;
  z-index: 1;
}

.cc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cc-header__copy {
  display: grid;
  gap: 8px;
}

.cc-header__eyebrow {
  margin: 0;
  color: var(--line-green-deep);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cc-header__title {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1.04;
}

.cc-header__actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.cc-header__date {
  color: var(--muted);
  font-weight: 700;
}

.cc-refresh {
  min-width: 52px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
}

.cc-error-banner {
  margin: 0 0 12px;
}

.cc-stale-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(197, 156, 27, 0.28);
  border-radius: 18px;
  background: rgba(197, 156, 27, 0.12);
  color: #7d5600;
  font-weight: 700;
}

.cc-grid {
  display: grid;
  gap: 16px;
}

.cc-widget {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(234, 246, 237, 0.7)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 30px rgba(8, 46, 18, 0.07);
}

.cc-widget__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.cc-widget__eyebrow {
  margin: 0 0 6px;
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cc-widget__title {
  margin: 0;
  font-size: 1.18rem;
}

.cc-widget__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.cc-widget__body {
  min-height: 92px;
}

.cc-stack {
  display: grid;
  gap: 12px;
}

.cc-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(17, 54, 22, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.cc-card__main {
  display: grid;
  justify-items: start;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-card__title {
  font-size: 1rem;
  line-height: 1.45;
}

.cc-card__subtle {
  color: var(--muted);
  font-size: 0.94rem;
}

.cc-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-card--critical {
  border-color: rgba(211, 53, 75, 0.22);
  background: linear-gradient(150deg, rgba(211, 53, 75, 0.12), rgba(255, 255, 255, 0.88));
}

.cc-card--urgent {
  border-color: rgba(197, 156, 27, 0.24);
  background: linear-gradient(150deg, rgba(197, 156, 27, 0.14), rgba(255, 255, 255, 0.9));
}

.cc-card--warning {
  border-color: rgba(20, 114, 255, 0.18);
  background: linear-gradient(150deg, rgba(20, 114, 255, 0.1), rgba(255, 255, 255, 0.9));
}

.cc-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--line-green-soft);
  color: var(--line-green-deep);
  font-size: 0.9rem;
  font-weight: 800;
}

.cc-inline-button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 16px;
}

.cc-subsection {
  display: grid;
  gap: 10px;
}

.cc-subsection__title {
  margin: 0;
  font-size: 0.98rem;
}

.cc-subsection__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(17, 54, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.cc-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cc-list__item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.cc-list__title {
  font-weight: 700;
}

.cc-list__detail {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.cc-chart__value {
  fill: currentColor;
  font-size: 12px;
  font-weight: 800;
}

.cc-chart__label {
  fill: var(--muted);
  font-size: 11px;
}

.cc-stage-row {
  display: grid;
  gap: 8px;
}

.cc-stage-row__label {
  margin: 0;
  font-weight: 700;
}

.cc-stage-row__track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 54, 22, 0.08);
}

.cc-stage-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--line-green), var(--accent-blue));
}

.cc-stage-row__count {
  color: var(--muted);
  font-size: 0.94rem;
}

.cc-meter {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(6, 199, 85, 0.16), rgba(20, 114, 255, 0.1));
}

.cc-meter__percent {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
}

.cc-meter__track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.cc-meter__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--line-green), var(--accent-blue));
}

.cc-meter__amount {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.cc-skeleton.is-loading {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border-radius: 20px;
  background: linear-gradient(110deg, rgba(17, 54, 22, 0.06), rgba(255, 255, 255, 0.55), rgba(17, 54, 22, 0.06));
  background-size: 240% 100%;
  animation: cc-skeleton 1.2s linear infinite;
}

.cc-skeleton.is-loading::before,
.cc-skeleton.is-loading::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.cc-skeleton.is-loading::before {
  top: 18px;
  height: 22px;
}

.cc-skeleton.is-loading::after {
  top: 56px;
  height: 14px;
}

@keyframes cc-skeleton {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -40% 0;
  }
}

@media (prefers-color-scheme: dark) {
  .cc-shell {
    background:
      linear-gradient(145deg, rgba(9, 18, 12, 0.96), rgba(10, 24, 15, 0.92)),
      radial-gradient(circle at top right, rgba(20, 114, 255, 0.14), transparent 36%);
  }

  .cc-stale-banner {
    color: #ffe7a6;
  }

  .cc-widget,
  .cc-card,
  .cc-subsection__trigger,
  .cc-list__item {
    background: rgba(14, 29, 18, 0.88);
  }

  .cc-chart__value {
    fill: #f3f7f0;
  }

  .cc-stage-row__track,
  .cc-meter__track {
    background: rgba(255, 255, 255, 0.08);
  }

  .cc-skeleton.is-loading {
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    background-size: 240% 100%;
  }

  .cc-skeleton.is-loading::before,
  .cc-skeleton.is-loading::after {
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (min-width: 720px) {
  .cc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-widget[data-widget="W1"],
  .cc-widget[data-widget="W4"],
  .cc-widget[data-widget="W7"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .cc-header {
    flex-direction: column;
  }

  .cc-header__actions {
    width: 100%;
    justify-items: start;
  }

  .cc-widget {
    padding: 16px;
  }
}
