/* ============================================================================
   EVALIA — Wizard
   Patrón Stitch (screen 4): cabecera + sidebar vertical de pasos + card + barra.
   ============================================================================ */

.wizard { display: block; }

/* ---------- HEAD ---------- */
.wiz-head {
  margin-bottom: var(--s-6);
}
.wiz-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.wiz-head h1 {
  font-size: var(--fs-32);
  letter-spacing: -.04em;
  line-height: 1.1;
  margin: 0 0 8px;
}
.wiz-head .lead {
  font-size: var(--fs-15);
  color: var(--on-surface-muted);
  max-width: 64ch;
  line-height: 1.6;
}

/* ---------- BODY: sidebar + main ---------- */
.wiz-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--s-6);
  align-items: start;
}
@media (max-width: 980px) {
  .wiz-body { grid-template-columns: 1fr; }
}

/* ---------- SIDEBAR STEPPER ---------- */
.wiz-side {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-5));
}
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--on-surface-muted);
  border: 1px solid transparent;
}
.step:hover { background: var(--surface-dim); color: var(--on-surface); }
.step.on {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgb(15 23 42 / .12), 0 6px 14px -4px rgb(15 23 42 / .30);
}
.step.on .step-hint { color: rgb(255 255 255 / .68); }
.step.done .step-num { background: var(--success-soft); color: var(--success); border-color: var(--success-soft); }
.step.done .step-num svg { width: 14px; height: 14px; }
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--surface-dim);
  color: var(--on-surface-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
}
.step.on .step-num {
  background: rgb(255 255 255 / .12);
  color: var(--on-primary);
  border-color: transparent;
}
.step-text { min-width: 0; }
.step-label {
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  color: inherit;
}
.step-hint {
  font-size: 11.5px;
  color: var(--on-surface-faint);
  line-height: 1.35;
}
@media (max-width: 980px) {
  .wiz-side { position: static; }
  .stepper { flex-direction: row; overflow-x: auto; padding-bottom: 6px; gap: 8px; }
  .step { min-width: 200px; }
}

/* ---------- MAIN CARD ---------- */
.wiz-main {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.wiz-card {
  background: var(--surface-bright);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: var(--s-7) var(--s-7);
}
@media (max-width: 640px) {
  .wiz-card { padding: var(--s-5); }
}

.card-section { margin-bottom: var(--s-7); }
.card-section:last-child { margin-bottom: 0; }
.card-section h2 {
  font-size: var(--fs-20);
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.card-section .card-lead {
  color: var(--on-surface-muted);
  font-size: var(--fs-14);
  margin: 0 0 var(--s-5);
  max-width: 64ch;
  line-height: 1.6;
}
.sec-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin: var(--s-5) 0 var(--s-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sec-hint {
  font-size: var(--fs-13);
  color: var(--on-surface-muted);
  margin: 0 0 var(--s-4);
}

/* ---------- ROLES ---------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
@media (max-width: 620px) { .role-grid { grid-template-columns: 1fr; } }
.role {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-bright);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.role:hover { border-color: var(--line-strong); background: var(--surface-dim); }
.role.on {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.role-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-bright);
  color: transparent;
  transition: all var(--t-fast);
}
.role.on .role-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.role-check svg { width: 14px; height: 14px; }
.role-label {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 2px;
}
.role-hint {
  font-size: 12.5px;
  color: var(--on-surface-muted);
  line-height: 1.45;
}

/* ---------- QUESTIONS ---------- */
.q-list { display: flex; flex-direction: column; gap: var(--s-3); }
.q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-bright);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.q:hover { border-color: var(--line-strong); box-shadow: var(--sh-xs); }
.q.hot  { border-left: 3px solid var(--danger); }
.q.warm { border-left: 3px solid var(--accent); }
.q.idk  { border-left: 3px solid var(--info); }
.q-text { flex: 1; min-width: 0; }
.q-title { font-size: var(--fs-14); font-weight: 600; color: var(--on-surface); line-height: 1.45; margin-bottom: 4px; }
.q-hint  { font-size: 12.5px; color: var(--on-surface-muted); line-height: 1.5; margin-bottom: 4px; }
.q-art   {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sub-q { margin: 10px 0 0 var(--s-5); padding-left: 14px; border-left: 2px solid var(--line); }

.bulk-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--primary);
  font-weight: 600;
  padding: 6px 0;
  margin-bottom: var(--s-3);
  text-transform: uppercase;
}
.bulk-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ACTIONS BAR (sticky bottom) ---------- */
.wiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 14px 20px;
  background: var(--surface-bright);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  position: sticky;
  bottom: var(--s-3);
  z-index: 10;
}
.wiz-actions .actions-right { display: inline-flex; gap: var(--s-2); align-items: center; }
.wiz-actions .wiz-progress {
  font-size: 11px;
  color: var(--on-surface-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
@media (max-width: 640px) {
  .wiz-actions { flex-wrap: wrap; }
  .wiz-actions .wiz-progress { order: 3; width: 100%; text-align: center; }
}

/* ---------- OBLIGACIONES (pane 8) ---------- */
.gauge-wrap {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-5) var(--s-6);
  background: var(--surface-dim);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
}
.gauge {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.gauge-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--fs-20);
  letter-spacing: -.02em;
  color: var(--on-surface);
}
.gauge-info { min-width: 0; }
.gauge-veredicto { font-weight: 800; font-size: var(--fs-16); letter-spacing: -.015em; margin-bottom: 2px; }
.gauge-detail { color: var(--on-surface-muted); font-size: 12.5px; }

.obl-list { display: flex; flex-direction: column; gap: var(--s-3); }
.obl-task {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-bright);
}
.obl-top {
  display: flex;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-dim);
  border-bottom: 1px solid var(--line);
}
.obl-title { flex: 1; min-width: 0; }
.obl-art {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 2px;
}
.obl-title strong { font-weight: 700; font-size: var(--fs-14); }
.obl-sub { font-size: 12px; color: var(--on-surface-muted); margin-top: 2px; }
.obl-body { padding: 14px 16px; }
.obl-evidence {
  font-size: 11.5px;
  color: var(--on-surface-muted);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.obl-evidence strong { color: var(--on-surface); }
.last-rev { font-family: var(--font-mono); }

.gap-list { display: flex; flex-direction: column; gap: var(--s-2); }
.gap {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  border: 1px solid rgb(220 38 38 / .25);
  border-left: 3px solid var(--danger);
  align-items: flex-start;
  font-size: 12.5px;
}
.gap.partial { background: var(--warn-soft); border-color: rgb(180 83 9 / .25); border-left-color: var(--accent); }
.gap.pendiente { background: var(--info-soft); border-color: rgb(30 64 175 / .25); border-left-color: var(--info); }
.g-art {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 2px;
  letter-spacing: .04em;
}
.g-body { flex: 1; }
.prio {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  text-transform: uppercase;
  margin-left: 8px;
}
.prio.alta  { background: var(--danger-soft); color: var(--danger); }
.prio.media { background: var(--warn-soft); color: var(--accent); }
.prio.baja  { background: var(--surface-dim); color: var(--on-surface-muted); }

/* ---------- DOCUMENTOS (pane 9) ---------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-3);
}
.doc {
  text-align: left;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-bright);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.doc:hover { border-color: var(--primary); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.doc.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.doc-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.doc-name { font-weight: 700; font-size: var(--fs-14); margin-bottom: 4px; letter-spacing: -.01em; }
.doc-desc { font-size: 12px; color: var(--on-surface-muted); line-height: 1.45; }

.doc-preview-wrap { display: flex; flex-direction: column; gap: var(--s-4); }
.doc-preview-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-3); }
.doc-preview-head .sec-title { margin: 0; flex: 1; }
.doc-preview {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s-7) var(--s-8);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-width: 780px;
  margin: 0 auto;
  color: var(--on-surface);
}
@media (max-width: 880px) { .doc-preview { padding: var(--s-5); } }

/* ---------- AUDIT ---------- */
.audit-card {
  background: var(--surface-bright);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.audit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  font-weight: 700;
}
.audit-list { display: flex; flex-direction: column; }
.audit-row {
  display: grid;
  grid-template-columns: 170px 1fr 1fr 120px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  align-items: baseline;
}
.audit-row:last-child { border-bottom: 0; }
.audit-row .a-date { color: var(--on-surface-muted); font-size: 10.5px; }
.audit-row .a-field { font-weight: 700; }
.audit-row .a-change { color: var(--on-surface-muted); }
.audit-row .a-user { color: var(--on-surface-faint); font-size: 11px; }
@media (max-width: 740px) {
  .audit-row { grid-template-columns: 1fr 1fr; }
  .audit-row .a-change, .audit-row .a-user { grid-column: 1 / -1; }
}
