/* ============================================================ */
/* Walkthrough scenes — REAL platform styling (rs-* classes)    */
/* Matches /Page-1/* frames from BPM Export .fig                */
/* ============================================================ */

.wt-stage { position: absolute; inset: 0; }

/* Scene container — real app has light bg */
.rs-root {
  position: absolute; inset: 0;
  background: #F1F2F7;
  font-family: 'Outfit', sans-serif;
  color: #132B52;
  font-size: 11px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
/* Fade scrollbars */
.rs-root::-webkit-scrollbar { width: 6px; height: 6px; }
.rs-root::-webkit-scrollbar-thumb { background: rgba(19,43,82,0.15); border-radius: 3px; }

/* ── Shared header ── */
.rs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(19,43,82,0.06);
  flex-shrink: 0;
}
.rs-header-left { display: flex; align-items: center; gap: 8px; }
.rs-back { color: #F26649; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
.rs-brand { height: 16px; }
.rs-header-id {
  font-weight: 600;
  font-size: 10.5px;
  color: #132B52;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── Body layout ── */
.rs-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  flex: 1;
  min-height: 0;
}
.rs-side {
  background: #FFFFFF;
  padding: 12px 10px;
  border-right: 1px solid rgba(19,43,82,0.04);
  overflow: auto;
}
.rs-side-id {
  font-size: 10px;
  color: #132B52;
  padding: 2px 6px 10px;
  border-bottom: 1px solid rgba(19,43,82,0.06);
  margin-bottom: 8px;
}
.rs-side-id b { font-weight: 700; }
.rs-side-item {
  padding: 5px 8px;
  font-size: 10px;
  color: #132B52;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.rs-side-item.on {
  background: #E3F2F8;
  font-weight: 600;
}

.rs-main {
  padding: 14px 16px 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Section bar (the navy "Solicitud" banner) ── */
.rs-section-bar {
  background: #002652;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
  padding: 9px 14px;
  letter-spacing: -0.005em;
}

/* ── Tab row (navy active tab pattern) ── */
.rs-tabs-row {
  background: #528CD6;
  border-radius: 6px;
  padding: 3px;
  display: flex;
  align-items: stretch;
}
.rs-tabs-item {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  padding: 7px 8px;
  cursor: pointer;
}
.rs-tabs-item.on {
  background: #002652;
  border-radius: 5px;
}
.rs-tabs-item.navy {
  background: #002652;
  border-radius: 5px;
}
.rs-tabs-sep {
  width: 1px;
  background: rgba(255,255,255,0.3);
  margin: 6px 0;
}

/* ── Cards ── */
.rs-card {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 13px 16px;
  box-shadow: 0 2px 6px rgba(19,43,82,0.04);
}
.rs-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #132B52;
  background: #E3F2F8;
  padding: 7px 10px;
  border-radius: 6px;
  margin: -4px -6px 10px;
  letter-spacing: -0.005em;
}
.rs-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #132B52;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.rs-subtitle {
  font-size: 10px;
  color: #528CD6;
  font-weight: 500;
  margin-top: -4px;
  margin-bottom: 8px;
}

/* ── Key/Value grid ── */
.rs-kv-grid {
  display: grid;
  gap: 10px 14px;
}
.rs-kv-grid.rs-5 { grid-template-columns: 0.7fr 1fr 1.6fr 1.2fr 1.3fr; }
.rs-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rs-kv-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #132B52;
  letter-spacing: 0.04em;
}
.rs-kv-value {
  font-size: 10px;
  color: #528CD6;
  font-weight: 500;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-kv-value.green { color: #01A388; font-weight: 600; }
.rs-kv-line { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-bottom: 8px; }

/* ── 4-column Información de la Solicitud ── */
.rs-four-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.rs-col {
  padding: 0 10px;
  border-left: 1px solid rgba(163,212,232,0.4);
}
.rs-col:first-child { border-left: none; padding-left: 0; }
.rs-col-h {
  display: inline-block;
  background: #E3F2F8;
  color: #132B52;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.rs-col-row { margin-bottom: 6px; }
.rs-col-k {
  font-size: 8px;
  font-weight: 600;
  color: #132B52;
  letter-spacing: 0.04em;
  margin-bottom: 1px;
}
.rs-col-v {
  font-size: 10px;
  color: #528CD6;
  font-weight: 500;
}
.rs-col-v.green { color: #01A388; font-weight: 600; }

/* ── Descargas strip ── */
.rs-downloads {
  background: #E3F2F8;
  border-radius: 6px;
  padding: 10px 6px;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
}
.rs-dl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  text-align: center;
}
.rs-dl-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #01A388;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rs-dl.warn .rs-dl-check { color: #F27D4F; }
.rs-dl-name {
  font-size: 8.5px;
  font-weight: 600;
  color: #132B52;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.rs-dl-status {
  font-size: 8px;
  color: #01A388;
  font-weight: 500;
  line-height: 1;
}
.rs-dl.warn .rs-dl-status { color: #F27D4F; }

/* ── Oferta rows ── */
.rs-oferta-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rs-oferta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #132B52;
}
.rs-oferta-k {
  flex: 0 0 170px;
  font-weight: 500;
  color: #132B52;
}
.rs-oferta-v.strong {
  font-size: 12px;
  font-weight: 700;
  color: #132B52;
}
.rs-input {
  background: #FFFFFF;
  border: 1px solid #A3D4E8;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  color: #528CD6;
  font-family: 'Outfit', sans-serif;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.rs-input.narrow { min-width: 48px; width: 48px; justify-content: center; }
.rs-input.muted { color: rgba(82,140,214,0.5); }
.rs-input.small { min-width: 42px; padding: 2px 8px; }
.rs-icon-ok, .rs-icon-x { display: inline-flex; }

/* ── Action buttons (bottom) ── */
.rs-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rs-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  letter-spacing: -0.005em;
  color: #FFFFFF;
}
.rs-btn.green { background: #01A388; }
.rs-btn.green-outline { background: #E0FAF1; color: #01A388; border: 1px solid #01A388; }
.rs-btn.red { background: #E16D68; }
.rs-btn.red-outline { background: #FFF1F0; color: #E16D68; border: 1px solid #E16D68; }
.rs-btn.gray { background: #F1F2F7; color: #132B52; border: 1px solid rgba(19,43,82,0.15); }

/* ── Progress (Expediente) ── */
.rs-progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 4px; }
.rs-progress-bar {
  background: #E3F2F8;
  border: 1px solid #A3D4E8;
  border-radius: 999px;
  height: 18px;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}
.rs-progress-fill {
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, #528CD6, #2B60B8);
  border-radius: inherit;
}
.rs-progress-fill.empty { display: none; }
.rs-progress-text {
  position: relative;
  z-index: 1;
  font-size: 9.5px;
  font-weight: 600;
  color: #FFFFFF;
  padding: 3px 10px;
  mix-blend-mode: normal;
}
.rs-progress-fill.empty ~ .rs-progress-text { color: #528CD6; }

.rs-chip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.rs-chip {
  background: #E3F2F8;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rs-chip-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #01A388;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rs-chip-name { font-size: 9.5px; font-weight: 600; color: #132B52; }
.rs-chip-sub { font-size: 8.5px; color: #F27D4F; font-weight: 500; }

/* ── Doc table (Expediente) ── */
.rs-doctable {
  border: 1px solid rgba(163,212,232,0.5);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.rs-doctr {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(163,212,232,0.5);
  padding: 8px 10px;
  font-size: 10px;
  gap: 6px;
}
.rs-doctr:last-child { border-bottom: none; }
.rs-doctr-head {
  background: #E3F2F8;
  font-weight: 700;
  color: #132B52;
  font-size: 9.5px;
}
.rs-doctd {
  flex: 0 0 60px;
  text-align: center;
  color: #132B52;
}
.rs-doctd.wide { flex: 1; text-align: left; }
.rs-doctd.action { display: flex; justify-content: center; }
.rs-doc-name { font-size: 10px; font-weight: 600; color: #132B52; }
.rs-doc-sub { font-size: 9px; color: #528CD6; margin-top: 1px; }
.rs-doc-sub.blue { color: #528CD6; }

.rs-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 6px 0;
  align-items: center;
  border-top: 1px solid rgba(163,212,232,0.4);
}
.rs-mini-k { font-size: 9px; font-weight: 700; color: #132B52; letter-spacing: 0.04em; }
.rs-mini-v { font-size: 10px; color: #528CD6; font-weight: 500; }

/* ── Dictamen Actas table ── */
.rs-act-table { border: 1px solid rgba(163,212,232,0.5); border-radius: 6px; overflow: hidden; }
.rs-act-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(163,212,232,0.5);
  padding: 8px 10px;
  font-size: 10px;
  gap: 6px;
}
.rs-act-row:last-child { border-bottom: none; }
.rs-act-head {
  background: #E3F2F8;
  font-weight: 700;
  color: #132B52;
  font-size: 9.5px;
}
.rs-act-add {
  padding: 6px 10px;
  font-size: 9.5px;
  font-weight: 600;
  color: #528CD6;
  text-align: right;
  background: #F9FAFB;
}

/* ── Scene visibility (animation) ── */
.wt-scene {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 400ms ease, transform 500ms ease;
  transform: translateY(12px) scale(0.985);
  pointer-events: none;
}
.wt-scene.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ── STEP 5 · Gestión de Cartera ────────────────────────────── */
.rs-cartera-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 4px 0 14px;
}
.rs-cartera-kpi {
  background: #FFFFFF;
  border: 1px solid rgba(163,212,232,0.5);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.rs-cartera-kpi-l {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #7E90A4;
}
.rs-cartera-kpi-v {
  font-size: 20px; font-weight: 600;
  color: #002652; letter-spacing: -0.01em;
  font-family: 'Outfit', sans-serif;
}
.rs-cartera-kpi-d {
  font-size: 10px; font-weight: 600;
}
.rs-cartera-kpi-d.pos { color: #0D9373; }
.rs-cartera-kpi-d.neu { color: #7E90A4; }

.rs-cartera-card-title {
  display: flex; align-items: center; justify-content: space-between;
}
.rs-cartera-filters {
  display: flex; gap: 6px;
}
.rs-cartera-chip {
  font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: #F3F7FA; color: #4A6580;
  border: 1px solid transparent;
}
.rs-cartera-chip.on {
  background: #E3F2F8; color: #002652;
  border-color: rgba(82,140,214,0.30);
}

.rs-cartera-table {
  border: 1px solid rgba(163,212,232,0.5);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.rs-cartera-row {
  display: flex; align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #E7F0F7;
  gap: 8px;
  font-size: 11px;
  color: #132B52;
}
.rs-cartera-row:last-child { border-bottom: none; }
.rs-cartera-row:hover:not(.rs-cartera-head) { background: #F9FBFD; }
.rs-cartera-head {
  background: #E3F2F8;
  font-size: 9px; font-weight: 700;
  color: #4A6580;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mono-muted {
  font-family: 'SF Mono','Fira Code',monospace;
  font-size: 10px; color: #4A6580;
}
.rs-cartera-name { font-weight: 600; color: #002652; }
.rs-cartera-amt {
  font-family: 'SF Mono','Fira Code',monospace;
  font-weight: 600; color: #002652;
}
.rs-cartera-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.rs-cartera-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.rs-cartera-status.s-vig { background: #D1F5EF; color: #0D9373; }
.rs-cartera-status.s-vig .dot { background: #0D9373; }
.rs-cartera-status.s-att { background: #FEF3C7; color: #D97706; }
.rs-cartera-status.s-att .dot { background: #D97706; }
.rs-cartera-status.s-ven { background: #FEE2E2; color: #B91C1C; }
.rs-cartera-status.s-ven .dot { background: #B91C1C; }
.rs-cartera-days { color: #7E90A4; font-weight: 600; }
.rs-cartera-days-warn { color: #B91C1C; font-weight: 700; }

.rs-cartera-alerts {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 4px;
}
.rs-cartera-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid #E7F0F7;
  border-radius: 6px;
}
.rs-cartera-alert-tag {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 48px; text-align: center;
}
.rs-cartera-alert-tag.warn { background: #FEF3C7; color: #D97706; }
.rs-cartera-alert-tag.info { background: #E3F2F8; color: #2B60B8; }
.rs-cartera-alert-body { flex: 1; }
.rs-cartera-alert-t { font-size: 11px; font-weight: 600; color: #002652; }
.rs-cartera-alert-sub { font-size: 10px; color: #7E90A4; margin-top: 1px; }
.rs-cartera-alert-time {
  font-size: 9px; color: #7E90A4;
  font-family: 'SF Mono','Fira Code',monospace;
  white-space: nowrap;
}
