:root {
  --bg-page: #f7f9fc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-subtle: #e2e8f0;
  --danger: #dc2626;
  --warning: #f59e0b;
  --success: #16a34a;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, #f8fafc 0%, #f5f8fc 100%);
}

.hero {
  background: radial-gradient(circle at 85% 15%, rgba(220, 38, 38, 0.08), transparent 45%), #f8fbff;
}

.container {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.section + .section {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.28) 50%, transparent 100%);
  pointer-events: none;
}

.problem {
  background: linear-gradient(180deg, #0f172a 0%, #111c31 100%);
}

.problem h2,
.problem p {
  color: #f8fafc;
}

.solution {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.risk {
  background: linear-gradient(180deg, #eef3f9 0%, #e8eef7 100%);
}

.final-cta {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.15;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  max-width: 38ch;
  line-height: 1.6;
  font-size: 1.05rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.content-col .btn-primary,
.centered .btn-primary {
  width: 100%;
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.layered {
  position: relative;
  box-shadow: var(--shadow-strong);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  pointer-events: none;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 12px;
}

.kpi.critical {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.kpi.healthy {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.kpi .label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.kpi .value {
  font-size: 22px;
  font-weight: 600;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.impact-block {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
}

.impact-block h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.impact-items {
  display: grid;
  gap: 10px;
}

.impact-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.impact-item.critical {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0.04));
  border-color: #fca5a5;
}

.impact-item.warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.04));
  border-color: #fcd34d;
}

.impact-title {
  line-height: 1.3;
}

.impact-consequence {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.impact-cost-line {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: -0.01em;
}

.certificate-focus-list {
  display: grid;
  gap: 10px;
}

.certificate-focus-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.certificate-focus-item.critical {
  border-color: #fca5a5;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.13), rgba(220, 38, 38, 0.03));
}

.certificate-focus-item.warning {
  border-color: #fcd34d;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.13), rgba(245, 158, 11, 0.03));
}

.focus-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.alerts {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
}

.alert {
  border: 1px solid var(--border-subtle);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
}

.alert.high {
  border-left-color: var(--danger);
  animation: blink-alert 1.8s ease-in-out infinite;
}

.alert.medium {
  border-left-color: var(--warning);
}

.alert.low {
  border-left-color: var(--success);
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.chip.danger {
  color: #991b1b;
  background: #fef2f2;
}

.chip.warning {
  color: #92400e;
  background: #fffbeb;
}

.chip.success {
  color: #166534;
  background: #f0fdf4;
}

.chip.neutral {
  color: var(--text-secondary);
  background: var(--surface-subtle);
}

.problem .stress-card {
  background: #111827;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.5);
}

.stress-grid {
  display: grid;
  gap: 10px;
}

.stress-item {
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #f1f5f9;
}

.stress-item:last-child {
  border-color: #7f1d1d;
  background: rgba(220, 38, 38, 0.18);
  color: #fee2e2;
}

.toolbar {
  display: grid;
  justify-content: stretch;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-full-head {
  grid-template-columns: 2fr 1.2fr 1.2fr 1fr 0.8fr;
}

.risk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.risk-items {
  display: grid;
  gap: 10px;
}

.risk-item {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.risk-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.risk-item.high {
  border-color: #fca5a5;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.03));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.12);
}

.risk-item.low {
  opacity: 0.92;
}

.risk-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.risk-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.impact-cost {
  font-size: 24px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.1;
}

.impact-cost.medium {
  color: #b45309;
}

.impact-cost.low {
  color: #166534;
}

.days-left {
  font-weight: 600;
}

.days-left.critical {
  color: var(--danger);
  font-size: 18px;
}

.days-left.warning {
  color: #b45309;
  font-size: 16px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 6px;
  animation: pulse 1.4s ease-in-out infinite;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.arrow {
  color: var(--text-secondary);
}

.status-summary {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.centered {
  text-align: center;
}

.final-cta .container {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 56px 24px;
  box-shadow: var(--shadow);
}

.floating-impact {
  margin-top: 10px;
  margin-left: 0;
  display: inline-grid;
  gap: 2px;
  padding: 12px 14px;
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
}

.floating-label {
  font-size: 11px;
  color: #cbd5e1;
}

.alert-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: pulse 1.6s infinite;
}

.ui-col .card {
  overflow: hidden;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes blink-alert {
  0%,
  100% {
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
  }
  50% {
    box-shadow: 0 7px 18px rgba(220, 38, 38, 0.24);
  }
}

@media (min-width: 768px) {
  .container {
    width: min(1280px, calc(100% - 48px));
  }

  .content-col .btn-primary,
  .centered .btn-primary {
    width: auto;
    min-width: 200px;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .impact-items {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 32px;
    align-items: center;
  }

  .panel-grid {
    grid-template-columns: 2fr 1fr;
    gap: 16px;
  }

  .risk-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
  }

  .toolbar {
    display: flex;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
  }
}

@media (max-width: 980px) {
  .section {
    padding: 80px 0;
  }

  .floating-impact {
    margin: 12px 0 0;
  }
}
