:root {
  --bg: #eff4f8;
  --panel: #ffffff;
  --ink: #102132;
  --ink-soft: #445c76;
  --line: #c8d8e7;
  --brand: #2f5d90;
  --brand-soft: #6fa6d8;
  --mint: #86cbb6;
  --ok: #1e7c58;
  --warn: #a66a23;
  --danger: #b23c3c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #f8fbfd 0%, var(--bg) 55%, #e8eff6 100%);
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(740px 360px at -8% -12%, rgba(111, 166, 216, 0.24) 0%, transparent 72%),
    radial-gradient(680px 340px at 104% 0%, rgba(134, 203, 182, 0.22) 0%, transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 14px 40px;
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(18, 33, 50, 0.08);
}

.hero {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #9dbde2;
  background: linear-gradient(140deg, #edf5ff 0%, #f1fbf7 100%);
  color: var(--brand);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 8px 0;
  font-family: "Avenir Next Demi Bold", "Century Gothic", sans-serif;
  letter-spacing: -0.02em;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

.hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 78ch;
}

.hero-actions {
  display: flex;
  align-content: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 540px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 11px;
  padding: 9px 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.btn.primary {
  border: 1px solid #2f5d90;
  color: #f4f8fc;
  background: linear-gradient(180deg, #34689f 0%, #28557f 100%);
}

.btn.secondary {
  border: 1px solid #b8cbde;
  color: #22425f;
  background: linear-gradient(180deg, #fbfdff 0%, #eff6fc 100%);
}

.btn.soft {
  border: 1px solid #8bb2d8;
  color: var(--brand);
  background: linear-gradient(180deg, #f3f8ff 0%, #ebf5ff 100%);
}

.progress-wrap {
  padding: 12px 14px;
  display: grid;
  gap: 9px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.progress-top strong {
  color: #173857;
}

.progress-top span {
  color: #52708d;
  font-size: 13px;
}

.progress-track {
  height: 10px;
  background: #e5eef6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--mint) 100%);
  transition: width 180ms ease;
}

.workspace {
  display: grid;
  gap: 14px;
  grid-template-columns: 290px 1fr;
  align-items: start;
}

.pulse-row {
  padding: 10px 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pulse {
  border: 1px solid #c8daea;
  border-radius: 12px;
  padding: 9px 10px;
  background: linear-gradient(140deg, #f4f9ff 0%, #f3fbf8 100%);
}

.pulse span {
  font-size: 12px;
  color: #4f6f8b;
}

.pulse strong {
  display: block;
  margin-top: 4px;
  color: #1c3e5d;
}

.sidebar {
  padding: 14px;
  position: sticky;
  top: 12px;
}

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

.steps li {
  border: 1px solid #d7e4f1;
  border-radius: 12px;
  padding: 10px 11px;
  display: grid;
  gap: 9px;
  grid-template-columns: 14px 1fr;
  background: #fbfdff;
}

.steps li.active {
  border-color: #9dc0e1;
  background: linear-gradient(145deg, #f4f9ff 0%, #f2fbf7 100%);
}

.dot {
  margin-top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #96b6d5;
  background: #fff;
}

.steps li.active .dot {
  border-color: #2f5d90;
  background: #2f5d90;
}

.steps li.complete .dot {
  border-color: #1e7c58;
  background: #1e7c58;
}

.steps strong {
  display: block;
  font-size: 13px;
  color: #193b5a;
}

.steps p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #597590;
}

.content {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

h2 {
  margin: 0;
  font-family: "Avenir Next Demi Bold", "Century Gothic", sans-serif;
  font-size: 1.13rem;
}

.lead {
  margin: 6px 0 0;
  color: #4e6a84;
  font-size: 14px;
}

.grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: #34506a;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #bccfe1;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.checklist {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.check-section {
  border: 1px solid #cbdced;
  border-radius: 13px;
  overflow: hidden;
  background: #fcfdff;
}

.check-head {
  padding: 10px 12px;
  border-bottom: 1px solid #dbe7f2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, #edf3fb 0%, #e4eef8 100%);
}

.check-head strong {
  color: #1b3c5b;
}

.check-head span {
  color: #4f6f8b;
  font-size: 12px;
}

.check-items {
  display: grid;
}

.check-item {
  border-bottom: 1px solid #dce8f2;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: 2.2fr 0.8fr 1fr;
  align-items: start;
}

.check-item:last-child {
  border-bottom: 0;
}

.item-main strong {
  display: block;
  font-size: 13px;
}

.item-main p {
  margin: 4px 0 0;
  color: #57748f;
  font-size: 12px;
}

.severity {
  display: inline-flex;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
}

.sev-alta {
  border: 1px solid #ebb0b0;
  color: #972f2f;
  background: #fff4f4;
}

.sev-media {
  border: 1px solid #ebca9d;
  color: #8f5a1b;
  background: #fff7ec;
}

.sev-baja {
  border: 1px solid #a8d8c4;
  color: #27664a;
  background: #edf9f3;
}

.evidence-toolbar {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

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

.evidence-card {
  border: 1px solid #c8d9ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.evidence-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #d8e6f2;
}

.evidence-body {
  padding: 9px;
  display: grid;
  gap: 7px;
}

.risk-kpis {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
  border: 1px solid #c6d8ea;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(145deg, #f5f9ff 0%, #f4fbf8 100%);
}

.kpi-card span {
  font-size: 12px;
  color: #52718d;
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
  color: #183957;
}

.nested {
  margin-top: 12px;
  padding: 11px;
}

.nested h3 {
  margin: 0;
  font-family: "Avenir Next Demi Bold", "Century Gothic", sans-serif;
  font-size: 0.95rem;
}

.actions-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #2f4e69;
  font-size: 13px;
}

.table-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid #dce7f2;
  padding: 8px;
  font-size: 12.5px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: linear-gradient(180deg, #edf3fb 0%, #e2edf8 100%);
  color: #173754;
}

tr:last-child td {
  border-bottom: 0;
}

.report {
  margin-top: 12px;
  border: 1px solid #c7d8e8;
  border-radius: 14px;
  background: #fcfdff;
  padding: 14px;
}

.report h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: "Avenir Next Demi Bold", "Century Gothic", sans-serif;
}

.report h4 {
  margin: 14px 0 6px;
  font-family: "Avenir Next Demi Bold", "Century Gothic", sans-serif;
  font-size: 0.9rem;
}

.report p,
.report li {
  font-size: 13px;
  color: #2e4d67;
}

.report ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.wizard-footer {
  border-top: 1px solid #d5e3ef;
  margin-top: 4px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.muted {
  color: #617a93;
  font-size: 12.5px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

  .check-item {
    grid-template-columns: 1fr;
  }

  .risk-kpis {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
    max-width: 100%;
  }

  .progress-top {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .risk-kpis {
    grid-template-columns: 1fr;
  }

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

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

@media print {
  body {
    background: #fff;
  }

  .ambient,
  .hero-actions,
  .sidebar,
  .wizard-footer,
  .progress-wrap,
  .inline-actions,
  .evidence-toolbar {
    display: none !important;
  }

  .shell {
    padding: 0;
    max-width: 100%;
  }

  .panel {
    box-shadow: none;
    border: 0;
    border-radius: 0;
  }

  .content .step-panel {
    display: none !important;
  }

  .content .step-panel[data-step-panel="5"] {
    display: block !important;
  }
}
