:root {
  --module-overview-primary: #ff5a2e;
  --module-overview-primary-medium: #fe8222;
  --module-overview-primary-light: #fd931d;
}

.module-overview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
    radial-gradient(circle at top left, rgba(255, 140, 66, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.965) 0%, rgba(255, 255, 255, 0.92) 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.module-overview::after {
  content: "";
  position: absolute;
  inset: auto -8% -48% auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 72%);
  pointer-events: none;
}

.module-overview-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  padding-bottom: 14px;
}

.module-overview-topbar-title {
  font-size: clamp(1.1rem, 1rem + 0.65vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.module-overview-topbar-copy {
  margin-top: 4px;
  max-width: 60rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #475569;
}

.module-overview-topbar-meta {
  margin-top: 10px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #64748b;
}

.module-overview-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.module-overview-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding-top: 16px;
}

.module-overview-main.module-overview-main-with-aside {
  align-items: start;
}

.module-overview-content-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-overview-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 66, 0.22);
  background: rgba(255, 244, 238, 0.82);
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c65d1f;
}

.module-overview-headline {
  max-width: 50rem;
  font-size: clamp(1.5rem, 1.2rem + 0.75vw, 1.95rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #020617;
}

.module-overview-description {
  max-width: 50rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #475569;
}

.module-overview-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.module-overview-primary,
.module-overview-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.module-overview-primary {
  border: none;
  background: linear-gradient(
    135deg,
    var(--module-overview-primary) 0%,
    var(--module-overview-primary-medium) 52%,
    var(--module-overview-primary-light) 100%
  );
  color: #fff;
  box-shadow: 0 18px 34px -26px rgba(255, 90, 46, 0.75);
}

.module-overview-secondary {
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.26);
}

.module-overview-primary:hover,
.module-overview-secondary:hover {
  transform: translateY(-1px);
}

.module-overview-primary:hover {
  box-shadow: 0 22px 38px -24px rgba(255, 90, 46, 0.78);
}

.module-overview-secondary:hover {
  border-color: rgba(255, 140, 66, 0.32);
  box-shadow: 0 18px 34px -28px rgba(255, 90, 46, 0.36);
}

.module-overview-note {
  max-width: 44rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  padding: 16px 18px;
}

.module-overview-note-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.module-overview-note-copy {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #475569;
}

.module-overview-context-grid {
  display: grid;
  gap: 12px;
  max-width: 48rem;
}

.module-overview-context-card {
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px 18px;
}

.module-overview-context-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #64748b;
}

.module-overview-context-value {
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #020617;
}

.module-overview-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #475569;
}

.module-overview-status::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--module-overview-primary) 0%,
    var(--module-overview-primary-light) 100%
  );
  box-shadow: 0 0 0 4px rgba(255, 90, 46, 0.12);
  flex: none;
}

.module-overview-insight {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 140, 66, 0.18), transparent 34%),
    linear-gradient(165deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  color: #fff;
  box-shadow: 0 28px 60px -42px rgba(15, 23, 42, 0.9);
}

.module-overview-insight-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fdba74;
}

.module-overview-insight-title {
  margin-top: 10px;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.module-overview-insight-copy {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.module-overview-daypill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.module-overview-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.module-overview-metric {
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.module-overview-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.module-overview-chip-accent {
  background: rgba(255, 237, 231, 0.88);
  color: #d86721;
}

.module-overview-chip-neutral {
  background: rgba(241, 245, 249, 0.92);
  color: #475569;
}

html.dark .module-overview,
html[data-theme="dark"] .module-overview {
  border-color: rgba(51, 65, 85, 0.9);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36%),
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.36);
}

html.dark .module-overview-topbar,
html[data-theme="dark"] .module-overview-topbar,
html.dark .module-overview-note,
html[data-theme="dark"] .module-overview-note,
html.dark .module-overview-context-card,
html[data-theme="dark"] .module-overview-context-card,
html.dark .module-overview-metric,
html[data-theme="dark"] .module-overview-metric {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.55);
}

html.dark .module-overview-badge,
html[data-theme="dark"] .module-overview-badge {
  border-color: rgba(251, 146, 60, 0.24);
  background: rgba(124, 45, 18, 0.22);
  color: #fdba74;
}

html.dark .module-overview-topbar-title,
html[data-theme="dark"] .module-overview-topbar-title,
html.dark .module-overview-headline,
html[data-theme="dark"] .module-overview-headline,
html.dark .module-overview-context-value,
html[data-theme="dark"] .module-overview-context-value {
  color: #f8fafc;
}

html.dark .module-overview-topbar-copy,
html[data-theme="dark"] .module-overview-topbar-copy,
html.dark .module-overview-topbar-meta,
html[data-theme="dark"] .module-overview-topbar-meta,
html.dark .module-overview-description,
html[data-theme="dark"] .module-overview-description,
html.dark .module-overview-note-copy,
html[data-theme="dark"] .module-overview-note-copy,
html.dark .module-overview-status,
html[data-theme="dark"] .module-overview-status {
  color: #cbd5e1;
}

html.dark .module-overview-context-label,
html[data-theme="dark"] .module-overview-context-label,
html.dark .module-overview .text-slate-500,
html[data-theme="dark"] .module-overview .text-slate-500,
html.dark .module-overview .text-slate-600,
html[data-theme="dark"] .module-overview .text-slate-600 {
  color: #94a3b8;
}

html.dark .module-overview-chip-neutral,
html[data-theme="dark"] .module-overview-chip-neutral {
  background: rgba(51, 65, 85, 0.88);
  color: #e2e8f0;
}

html.dark .module-overview-chip-accent,
html[data-theme="dark"] .module-overview-chip-accent {
  background: rgba(124, 45, 18, 0.36);
  color: #fdba74;
}

html.dark .module-overview-secondary,
html[data-theme="dark"] .module-overview-secondary {
  border-color: rgba(71, 85, 105, 0.9);
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
}

@media (min-width: 768px) {
  .module-overview-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 1100px) {
  .module-overview-main.module-overview-main-with-aside {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.92fr);
  }
}

@media (max-width: 767px) {
  .module-overview {
    border-radius: 24px;
  }

  .module-overview-topbar-actions {
    width: 100%;
  }

  .module-overview-topbar-actions > * {
    flex: 1 1 100%;
  }

  .module-overview-primary,
  .module-overview-secondary {
    width: 100%;
  }

  .module-overview-insight {
    padding: 16px;
  }
}
