* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f8;
  color: #1c1e21;
}

.pantalla-centrada {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tarjeta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 32px;
  width: 100%;
  max-width: 360px;
}

.tarjeta h1 {
  font-size: 1.4rem;
  margin: 0 0 24px;
  text-align: center;
}

.campo {
  margin-bottom: 16px;
}

.campo label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.campo input,
.campo select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d3d9;
  border-radius: 8px;
  font-size: 1rem;
}

.boton-primario {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.boton-primario:disabled {
  background: #9db8e8;
  cursor: not-allowed;
}

.mensaje-error {
  color: #d92d20;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 1em;
  text-align: center;
}

.encabezado-app {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.encabezado-app h1 {
  font-size: 1.1rem;
  margin: 0;
}

.boton-secundario {
  background: none;
  border: 1px solid #d0d3d9;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.contenido {
  padding: 20px;
  max-width: 480px;
  margin: 0 auto;
}

.grupo-titulo {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tarjeta-deuda {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
}

.fila-deuda {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fila-deuda .concepto {
  font-weight: 600;
}

.fila-deuda .saldo {
  font-weight: 700;
}

.estado-punto {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.estado-punto.pendiente { background: #d92d20; }
.estado-punto.parcial { background: #f5a524; }
.estado-punto.pagado { background: #12b76a; }

.sin-deudas {
  color: #6b7280;
  font-size: 0.9rem;
  padding: 12px 0;
}

#historial-pagadas {
  margin-top: 24px;
}

#historial-pagadas summary {
  cursor: pointer;
  font-weight: 600;
  color: #4b5563;
  padding: 8px 0;
}

.resumen-deuda {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.fila-resumen {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
}

.fila-resumen.destacada {
  border-top: 1px solid #eee;
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 700;
}

.boton-registrar {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.tarjeta-pago {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.fila-pago-superior {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-estado {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-estado.pendiente { background: #fef0c7; color: #b54708; }
.badge-estado.en_revision { background: #d1e9ff; color: #175cd3; }
.badge-estado.validado { background: #d1fadf; color: #027a48; }
.badge-estado.rechazado { background: #fee4e2; color: #b42318; }

.pago-detalle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 6px;
}

.pago-motivo-rechazo {
  font-size: 0.85rem;
  color: #b42318;
  margin-top: 6px;
}
