/* =================================================
   WIZARD CFDI – CREAR FACTURA
   Compatible Desktop + Móvil
================================================= */

/* =================================================
   CONTENEDOR GENERAL
================================================= */
.card--wizard {
  padding: 0;
}

.wizard {
  display: flex;
  flex-direction: column;
}

/* =================================================
   HEADER / STEPS
================================================= */
.wizard__steps {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  background: #fff;
}

/* Paso individual */
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  background: #f8fafc;
  white-space: nowrap;
  transition: all .2s ease;
}

/* Número del paso */
.step__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Paso activo */
.step.is-active {
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 600;
}

.step.is-active .step__num {
  background: var(--blue-600);
  color: #fff;
}

/* Paso completado */
.step.is-done {
  background: #ecfeff;
  color: #0369a1;
}

.step.is-done .step__num {
  background: #0ea5e9;
  color: #fff;
}

/* =================================================
   CONTENIDO
================================================= */
.wizard__content {
  padding: 20px 18px;
  background: #fff;
}

.wizard__step {
  max-width: 560px;
}

.wizard__step h4 {
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text-main);
}

.wizard__step p {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =================================================
   GRID (PASO 2)
================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

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

/* =================================================
   CAMPOS DE FORMULARIO
================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 13px;
  color: var(--text-muted);
}

.field input,
.field select {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 14px;
  outline: none;
  background: #fff;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}

/* =================================================
   MENSAJES
================================================= */
.msg {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.msg--error {
  background: #fee2e2;
  color: #991b1b;
}

.msg--success {
  background: #dcfce7;
  color: #166534;
}

.hidden {
  display: none !important;
}

/* =================================================
   ACCIONES
================================================= */
.wizard__actions {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 640px) {
  .wizard__actions {
    flex-direction: column-reverse;
  }

  .wizard__actions .btn {
    width: 100%;
  }
}

/* =================================================
   TABLAS (PASO 3 + CONFIRMACIÓN)
================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
}

/* =================================================
   MODAL (AGREGAR CONCEPTO)
================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal__content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal__header h3 {
  font-size: 15px;
}

.modal__close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* =================================================
   CONFIRMACIÓN (PASO 4)
================================================= */
.box {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .wizard__steps {
    position: sticky;
    top: 56px; /* altura de tu topbar */
    z-index: 10;
    background: #fff;
  }
}
